accountant-ui/src/app.config.ts
2017-07-11 18:51:01 +02:00

27 lines
929 B
TypeScript

var operationsTmpl = require('./operations/operations.html');
var accountsTmpl = require('./accounts/accounts.html');
var schedulerTmpl = require('./scheduler/scheduler.html');
export default function AppConfig($routeProvider) {
// Defining template and controller in function of route.
$routeProvider
.when('/account/:accountId/operations', {
templateUrl: operationsTmpl,
controller: 'OperationController',
controllerAs: 'operationsCtrl'
})
.when('/account/:accountId/scheduler', {
templateUrl: schedulerTmpl,
controller: 'SchedulerController',
controllerAs: 'schedulerCtrl'
})
.when('/accounts', {
templateUrl: accountsTmpl,
controller: 'AccountController',
controllerAs: 'accountsCtrl'
})
.otherwise({
redirectTo: '/accounts'
});
};