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' }); };