Hi
I'm nooooob with angularjs.
I have this code:
function TestController($scope) {
$scope.objInf = [
{
id: 10,
sonido: "url",
imagen: "url",
}]
}
ObjInf have an object, but i need add more objects. I see a code with
function addObject in $scope, for simple push() new object in objInf array,
but this dunction is in testController, and this are executed in
view,(index.html).
I put function out of testcontroller for add objects, but he say me that
$scope dont exist.
I need this for give the localstorage, and create after any objects:
var new = newObject; //maked for the local storage.
$scope.objInf.push(new);
Thanks!! and excuse my english!!! ;)
--
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.