Search Posts

Category: angularjs-components

Change to parent component array with ngRepeat doesn’t trigger child $onChanges

I’m working with parent and child components. The child-component is one-way data bound (‘<‘) to a value that comes via an ng-repeat over an array in the parent component. <li ng-repeat=”item in $ctrl.items”> <child-component item=”item”></child-component> </li> And the component: var childComponent = { bindings: { item: ‘<‘ }, controller: ‘ChildComponentController’, template: ‘<div>{{ $ }}</div>’ } Perhaps I’ve misunderstood how $onChanges is supposed to work, but it seems like updating an item in the parent controller’s […]