Updated: Loading-bar to v0.0.5 Updated: Using the $promise of function to return promises instead of $q and callback function.
16 lines
417 B
JavaScript
16 lines
417 B
JavaScript
'use strict';
|
|
|
|
var UnpostedCtrl = ['$scope', 'info', 'Unposted', function ($scope, info, Unposted) {
|
|
$scope.info = info;
|
|
$scope.refresh = function () {
|
|
Unposted.query({}, function (result) {
|
|
$scope.info = result;
|
|
$scope.apply();
|
|
});
|
|
};
|
|
}];
|
|
UnpostedCtrl.resolve = {
|
|
info:['Unposted', function (Unposted) {
|
|
return Unposted.query({}).$promise;
|
|
}]
|
|
}; |