accountant-ui/src/app.config.ts

27 lines
921 B
TypeScript
Raw Normal View History

var operationsTmpl = require('./operations/operations.html');
var accountsTmpl = require('./accounts/accounts.html');
var schedulerTmpl = require('./scheduler/scheduler.html');
2017-07-07 22:31:49 +02:00
module.exports = function($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'
});
};