accountant-ui/src/app.config.ts

45 lines
1.3 KiB
TypeScript
Raw Normal View History

import { Level } from '@nsalaun/ng-logger';
var operationsTmpl = require('./operations/operations.html');
var accountsTmpl = require('./accounts/accounts.html');
var schedulerTmpl = require('./scheduler/scheduler.html');
2017-07-16 13:56:49 +02:00
export default function AppConfig($uiRouterProvider) {
$uiRouterProvider.trace.enable(1);
2017-07-07 22:31:49 +02:00
// Defining template and controller in function of route.
2017-07-16 13:56:49 +02:00
const $stateRegistry = $uiRouterProvider.stateRegistry;
$stateRegistry.register({
name: 'operations',
url: '/account/:accountId/operations',
templateUrl: operationsTmpl,
controller: 'OperationController',
controllerAs: 'operationsCtrl'
});
$stateRegistry.register({
name: 'scheduler',
url: '/account/:accountId/scheduler',
templateUrl: schedulerTmpl,
controller: 'SchedulerController',
controllerAs: 'schedulerCtrl'
});
$stateRegistry.register({
name: 'accounts',
url: '/accounts',
templateUrl: accountsTmpl,
controller: 'AccountController',
controllerAs: 'accountsCtrl'
});
const $urlService = $uiRouterProvider.urlService;
$urlService.rules.otherwise({
state: 'accounts'
});
2017-07-07 22:31:49 +02:00
};
export const ApiBaseURL = "http://localhost:8080/api";
export const LogLevel = Level.LOG;