Files
brewman/brewman/static/app/balance-sheet/balance-sheet.resolver.ts
tanshu f3c1bfa57b - Started using TypeScript
- Using SystemJS as Module Loader
 - Auth and Permissions moved to Credentials.service from $rootScope
 - Toasts moved to Messages.service
 - Massive Changes
 - Sprint 1 done to move to Angular.io from AngularJS
 - Should be fully working!! :)
2018-05-15 00:11:28 +05:30

12 lines
304 B
TypeScript

import * as angular from 'angular';
export function BalanceSheetResolver($route, BalanceSheet) {
const date = $route.current.params.date;
if (angular.isUndefined(date)) {
return BalanceSheet.get({}).$promise;
} else {
return BalanceSheet.get({date: date}).$promise;
}
}