Thanh toán mã bên dưới. Câu hỏi nằm trong phần bình luận.
angular.module('MainStreetMower.services', ['ngResource'])
.factory('Videos', function($resource) {
return $resource('/api/jobs/1/');
});
function VideoListCtrl($scope, Videos) {
$scope.videos = Videos.query();
$scope.what = function() {
// proper way to push to the videos array and $save() the new array.
}
}
Tôi nghĩ bạn cần mô tả những gì bạn muốn rõ ràng hơn – Neil