// vim: set tw=80 ts=4 sw=4 sts=4: /* This file is part of Accountant. Accountant is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Accountant is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with Accountant. If not, see . */ /* jshint node: true */ 'use strict'; var angular = require('angular'); import uiRouter from '@uirouter/angularjs'; import { AccountListState } from './accounts/account.states'; import { OperationListState } from './operations/operation.states'; import { ScheduleListState } from './scheduler/schedule.states'; import accountModule from '@accountant/accounts'; import loginModule from '@accountant/login'; import operationModule from '@accountant/operations'; import schedulerModule from '@accountant/scheduler'; export const AppModule = angular.module('accountant', [ uiRouter, accountModule, loginModule, operationModule, schedulerModule, ]); AppModule.config(['$uiRouterProvider', ($uiRouterProvider) => { $uiRouterProvider.trace.enable(1); // Defining template and controller in function of route. const $stateRegistry = $uiRouterProvider.stateRegistry; $stateRegistry.register(OperationListState); $stateRegistry.register(ScheduleListState); $stateRegistry.register(AccountListState); const $urlService = $uiRouterProvider.urlService; $urlService.rules.otherwise({ state: 'accounts' }); }]); AppModule.run(['$trace', $trace => { $trace.enable(1); }]);