Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- /**
- * Main module of the application.
- */
- var app = angular.module('app', [
- 'ngAnimate',
- 'ngCookies',
- 'ngResource',
- 'ngRoute',
- 'ngSanitize',
- 'ngTouch',
- 'ui.router',
- 'ui.bootstrap',
- 'ui.utils',
- 'ui.calendar',
- 'ngDialog',
- 'nvd3',
- 'ui.load',
- 'oc.lazyLoad',
- 'angular-loading-bar',
- 'mgo-angular-wizard',
- 'ui-rangeSlider',
- 'toastr',
- 'textAngular',
- 'ngStorage',
- 'hljs',
- 'angularScreenfull',
- 'app.directives',
- 'app.controllers',
- 'app.services'
- ])
- .config(
- ['$controllerProvider', '$compileProvider', '$filterProvider', '$provide',
- function ($controllerProvider, $compileProvider, $filterProvider, $provide) {
- // lazy controller, directive and service
- app.controller = $controllerProvider.register;
- app.directive = $compileProvider.directive;
- app.filter = $filterProvider.register;
- app.factory = $provide.factory;
- app.service = $provide.service;
- }
- ]);
- angular.module('app').config(['$stateProvider', '$urlRouterProvider', '$ocLazyLoadProvider', function ($stateProvider, $urlRouterProvider, $ocLazyLoadProvider) {
- $urlRouterProvider
- .otherwise('app/dashboard');
- $stateProvider
- .state('app', {
- abstract: true,
- url: '/app',
- templateUrl: 'Apps/Public/Main.html'
- })
- // Apps
- .state('app.calendar', {
- url: '/calendar',
- templateUrl: 'views/app.calendar.html'
- })
- .state('app.dashboard', {
- url: '/dashboard',
- controller: 'DashboardCtrl',
- templateUrl: 'Apps/Dashboard/Dashboard.html',
- resolve: {
- loadModule: ['$ocLazyLoad', function ($ocLazyLoad) {
- return $ocLazyLoad.load('Apps/Dashboard/DashboardCtrl.js');
- }]
- }
- })
- .state('app.documentation', {
- url: '/documentation',
- templateUrl: 'views/documentation.html'
- });
- }])
- .config(function (hljsServiceProvider) {
- hljsServiceProvider.setOptions({
- // replace tab with 4 spaces
- tabReplace: ' '
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement