accountant-ui/src/app.config.ts

42 lines
1.2 KiB
TypeScript
Raw Normal View History

import { Level } from '@nsalaun/ng-logger';
var operationsTmpl = require('./operations/operations.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',
2017-07-16 14:23:23 +02:00
component: 'accountList',
2017-07-16 13:56:49 +02:00
});
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;