Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- 'use strict';
- /**
- * The parent module that navigates you to any sub module.
- */
- angular
- .module('indirect', [
- 'ui.router',
- 'indirect.config',
- 'indirect.determination',
- 'indirect.reports'
- ])
- .config(MainConfiguration);
- /**
- * The parent module configuration that houses routing, translations, etc.
- * @param {provider} $stateProvider - Handles state changes in the main SPA.
- * @param {provider} $urlRouterProvider - Handles the default state.
- * @param {provider} $translateProvider - Handles translations.
- * @constructor
- * @ngInject
- **/
- function MainConfiguration($stateProvider, $urlRouterProvider, $translateProvider) {
- $stateProvider
- .state('indirect.determination.home', {
- url: '/determination',
- templateUrl: 'js/components/home/indirect-view.html',
- controller: 'indirectHomeController',
- controllerAs: 'homeCtrl'
- })
- .state('indirect.reports.home', {
- url: '/reports',
- templateUrl: 'js/components/reports/reports-view.html',
- controller: 'reportsController',
- controllerAs: 'reportsCtrl'
- });
- if(typeof(LoneStar) !== 'object') {
- $translateProvider.useStaticFilesLoader({
- prefix: '/languages/indirect-',
- suffix: '.json'
- });
- $translateProvider.preferredLanguage('en');
- $urlRouterProvider.otherwise('indirect.determination.home');
- }
- }
- /**
- * The determination sub module declaration.
- */
- angular
- .module('indirect.determination', [
- 'ui.router',
- 'pascalprecht.translate',
- 'fef',
- 'bento.modern',
- 'tmh.dynamicLocale',
- 'wj',
- 'indirect.config',
- 'determination-templates'
- ])
- .config(Configuration);
- /**
- * Configures angular components used within the application.
- * @param {provider} $stateProvider - Handles state management in the application.
- * @param {provider} $urlRouterProvider - Handles the default state of the
- * @param {provider} $translateProvider - Handles all translations in the application.
- * @constructor
- * @ngInject
- **/
- function Configuration($stateProvider, $urlRouterProvider, $translateProvider) {
- $stateProvider
- .state('determination', {
- url: '/indirect',
- templateUrl: 'js/components/home/indirect-view.html',
- controller: 'indirectHomeController',
- controllerAs: 'indirect'
- })
- .state('determination.home', {
- url: '/home',
- templateUrl: 'js/components/dashboard/dashboard-view.html',
- controller: 'indirectDashboardController',
- controllerAs: 'indirectDashboard'
- })
- .state('determination.customers', {
- url: '/customers',
- templateUrl: 'js/components/exemption-certificates/customers/customers-view.html',
- controller: 'indirectCustomersController',
- controllerAs: 'indirectCustomers'
- })
- .state('determination.companies', {
- url: '/companies' ,
- templateUrl: 'js/components/configuration/companies/companies-view.html',
- controller: 'indirectCompaniesController' ,
- controllerAs: 'indirectCompanies'
- })
- .state('determination.taxJurisdictions', {
- url: '/taxJurisdictions',
- templateUrl: 'js/components/configuration/tax-jurisdictions/tax-jurisdictions-view.html',
- controller: 'indirectTaxJurisdictionsController',
- controllerAs: 'indirectTaxJurisdictions'
- });
- if(typeof(LoneStar) !== 'object') {
- $translateProvider.useStaticFilesLoader({
- prefix: '/languages/indirect-',
- suffix: '.json'
- });
- $translateProvider.preferredLanguage('en');
- $urlRouterProvider.otherwise('determination.companies');
- }
- }
- /**
- * The reporting sub module declaration.
- */
- angular
- .module('indirect.reports', ['ui.router'])
- .config(ReportsConfiguration);
- /**
- * Handles the state routing and the translations for the Reports module.
- * @param {provider} $stateProvider - Handles state management in the application.
- * @param {provider} $urlRouterProvider - Handles the default state of the
- * @param {provider} $translateProvider - Handles all translations in the application.
- * @constructor
- * @ngInject
- */
- function ReportsConfiguration($stateProvider, $urlRouterProvider, $translateProvider) {
- $stateProvider
- .state('reports', {
- url: '/reports',
- templateUrl: 'js/components/reports/reports-view.html',
- controller: 'reportsController',
- controllerAs: 'reportsCtrl'
- });
- if(typeof(LoneStar) !== 'object') {
- $translateProvider.useStaticFilesLoader({
- prefix: '/languages/indirect-',
- suffix: '.json'
- });
- $translateProvider.preferredLanguage('en');
- $urlRouterProvider.otherwise('reports');
- }
- }
- }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement