2017-07-07 22:36:04 +02:00
|
|
|
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'
|
|
|
|
});
|
|
|
|
};
|