I am currently working on assigning a controller to each item in a list in order to manipulate the data of each list item individually. The information displayed will vary for each item.
<div ng-repeat="item in items" ng-controller="ItemController">
{{item.name}}
<select ng-model="selectedSystem" ng-options="system.name for system in systems">
<button ng-click="dosomething()">do something</button>
</div>
Is there a way to access the item within the ItemController
? I want to be able to customize the list of systems based on the specific item being accessed inside the ItemController
.
Is it possible to move all the content inside the divs into a template when using ng-repeat
?
Thank you!