Controllers:
var ProductsCtrl = function ($scope) {
$scope.products = [ {name: 'one'}, {name: 'two'}, {name:'three'} ];
};
var ProductCtrl = function ($scope) {
$scope. // How do I access the current product name?
};
view:
<ul ng-controller='ProductsCtrl'>
<li ng-repeat='product in products' ng-controller='ProductCtrl'>
</li>
</ul>
The current product is accessible in the scope as “product” in your case.
if you repeat something like this :
ng-repeat=”item in items” your child controller will have “item” in the scope.
So in your example :