I'm getting some list of data from database, with angular I'm adding it to scope. So on $scope I have list of objects
[Object, Object, Object, Object]
Where each looks like:
0: "1"
1: "This is my first task"
2: "1"
3: "1"
$$hashKey: "object:3"
active: "1"
id: "1"
priority: "1"
text: "This is my first task"
I basicly try to add new OBJECT to it, with something like:
$scope.tasks.push($scope.newTask);
But this add just string / array not an object, I already tryed to add multiple other way to add object like
$scope.tasks.push("text": $scope.newTask);
But I can't make it work, please may I ask you for help to lead on correct way?
console.log($scope.newTask);and show us the result.