Consider this Plnkr for example. I don\'t know how many members of fooCollection will be created beforehand. So I don\'t know how many bar models a
Create individual list-item controllers: demo on Plnkr
angular
.module('testApp', [])
.controller('testCtrl', function ($scope) {
$scope.fooCollection = [];
})
.controller('fooCtrl', function ($scope) {
$scope.$watch('foo.bar', function (newValue, oldValue) {
console.log('watch fired, new value: ' + newValue);
});
});
Tell me your name:
Hello, my name is {{ foo.bar }}