i have a array of objects in the controller . when the controller invoked,ng-repeat shows all objects in the array as list. works fine.. but when i push a new object first time into the array. works fine.. it shows the object as well. when i push another object into array it doesn't show that object.how to fix this issue? Controller:
App.controller('teamController', function($scope,$http,$routeParams,$location,$filter) {
$scope.teammembers = [];});
Directive:App.directive("searchableMultiselect", function($timeout) {
return {
templateUrl: 'angular/templates/team/teamdropdown.php',
restrict: 'AE',
scope: {
displayAttr: '@',
allItems: '=',
},link: function(scope, element, attrs) {});
**Template:**
<li ng-repeat="item in ::allItems track by $index">
Frontend:
<searchable-multiselect display-attr="name"
all-items="teammembers" >
</searchable-multiselect>