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!!! ;)