.controller("TasksCtrl", function ($scope, tasksFactory) {
$scope.tasks = tasks;
$scope.addNew = function(task){
alert("Add new called!");
$scope.tasks.push(task);
};
$scope.remove = function(index){
$scope.tasks.splice(index, 1);
};
$scope.edit= function(task){
$scope.current = task;
};
$scope.save= function(task){
$scope.current = {};
};
})
Так что я не знаю, если ошибка на заводе-изготовителе или в моем контроллерепытается вернуть массив уже заселен, но он возвращает пустую таблицу
**.factory('tasksFactory', function(){
var tasks = [
{ info: "Finish with the sales report for July", date:Date("October 13 ,2014 11:13:00"), hoursplanned:140, hoursworked:166 },
{ info: "Finish with the sales report for July", date:Date("October 13 ,2014 11:13:00"), hoursplanned:140, hoursworked:166 },
{ info: "Finish with the sales report for July", date:Date("October 13 ,2014 11:13:00"), hoursplanned:140, hoursworked:166 },
{ info: "Finish with the sales report for July", date:Date("October 13 ,2014 11:13:00"), hoursplanned:140, hoursworked:166 },
{ info: "Finish with the sales report for July", date:Date("October 13 ,2014 11:13:00"), hoursplanned:140, hoursworked:166 },
];
return tasks;
В чем вопрос? – jlew