Created
January 28, 2015 16:21
-
-
Save blaisethomas/e1efe047dc7974a95515 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Consider this code being found in the controller: | |
$scope.stuff = ["a", "b", "c", "d"]; | |
$scope.changeIt = function(idx) { | |
$scope.stuff[idx] = "x"; | |
}; | |
And this unordered list on the page: | |
<ul> | |
<li ng-repeat="letter in stuff track by $index" ng-bind="letter" ng-click="changeIt($index);"></li> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment