Advertisement
tatdat171

App.js

Jul 21st, 2015
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2.  
  3. /**
  4.  * Main module of the application.
  5.  */
  6. var app = angular.module('app', [
  7.     'ngAnimate',
  8.     'ngCookies',
  9.     'ngResource',
  10.     'ngRoute',
  11.     'ngSanitize',
  12.     'ngTouch',
  13.     'ui.router',
  14.     'ui.bootstrap',
  15.     'ui.utils',
  16.     'ui.calendar',
  17.     'ngDialog',
  18.     'nvd3',
  19.     'ui.load',
  20.     'oc.lazyLoad',
  21.     'angular-loading-bar',
  22.     'mgo-angular-wizard',
  23.     'ui-rangeSlider',
  24.     'toastr',
  25.     'textAngular',
  26.     'ngStorage',
  27.     'hljs',
  28.     'angularScreenfull',
  29.     'app.directives',
  30.     'app.controllers',
  31.     'app.services'
  32. ])
  33. .config(
  34.     ['$controllerProvider', '$compileProvider', '$filterProvider', '$provide',
  35.     function ($controllerProvider, $compileProvider, $filterProvider, $provide) {
  36.  
  37.         // lazy controller, directive and service
  38.         app.controller = $controllerProvider.register;
  39.         app.directive = $compileProvider.directive;
  40.         app.filter = $filterProvider.register;
  41.         app.factory = $provide.factory;
  42.         app.service = $provide.service;
  43.     }
  44.     ]);
  45.  
  46. angular.module('app').config(['$stateProvider', '$urlRouterProvider', '$ocLazyLoadProvider', function ($stateProvider, $urlRouterProvider, $ocLazyLoadProvider) {
  47.  
  48.     $urlRouterProvider
  49.         .otherwise('app/dashboard');
  50.  
  51.     $stateProvider
  52.  
  53.  
  54.  
  55.         .state('app', {
  56.             abstract: true,
  57.             url: '/app',
  58.             templateUrl: 'Apps/Public/Main.html'
  59.         })
  60.  
  61.         // Apps
  62.         .state('app.calendar', {
  63.             url: '/calendar',
  64.             templateUrl: 'views/app.calendar.html'
  65.         })
  66.         .state('app.dashboard', {
  67.             url: '/dashboard',
  68.             controller: 'DashboardCtrl',
  69.             templateUrl: 'Apps/Dashboard/Dashboard.html',
  70.             resolve: {
  71.                 loadModule: ['$ocLazyLoad', function ($ocLazyLoad) {
  72.                     return $ocLazyLoad.load('Apps/Dashboard/DashboardCtrl.js');
  73.                 }]
  74.             }
  75.         })
  76.  
  77.        
  78.  
  79.         .state('app.documentation', {
  80.             url: '/documentation',
  81.             templateUrl: 'views/documentation.html'
  82.         });
  83.  
  84. }])
  85.  
  86.  
  87. .config(function (hljsServiceProvider) {
  88.     hljsServiceProvider.setOptions({
  89.         // replace tab with 4 spaces
  90.         tabReplace: '    '
  91.     });
  92. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement