Howdy !
Does anyone know how one can simply read an object from an array.
Say one has a list like *$scope.items* and want read the object at a given
*index*.
Like one can add (*$scope.items.**push*) or remove (*$scope.items.**splice*)
an item object what is Angular's way to read (*$scope.items**.????*) an
item.
function ItemController($scope, Item) {
// scope init:
$scope.items = Item.query();
$scope.selectItem = function(index) {
$scope.selectedItem = *$scope.items**.????*;
alert("selected item is: " + $scope.selectedItem);
};
}
Any hints are welcome.
kacha
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.