nitweb/angular: add loading bar on top of screen
[nit.git] / share / nitweb / javascripts / nitweb.js
index 014dfba..99034a7 100644 (file)
  */
 
 (function() {
-       angular.module('nitweb', ['ngRoute', 'ngSanitize', 'entities'])
-
+       angular.module('nitweb', ['ngRoute', 'ngSanitize', 'angular-loading-bar', 'entities', 'index'])
+       .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) {
+               cfpLoadingBarProvider.includeSpinner = false;
+       }])
        .config(function($routeProvider, $locationProvider) {
                $routeProvider
                        .when('/', {
-                               templateUrl: 'views/index.html'
-                       })
-                       .when('/package/:id', {
-                               templateUrl: 'views/package.html',
-                               controller: 'EntityCtrl',
-                               controllerAs: 'entityCtrl'
-                       })
-                       .when('/group/:id', {
-                               templateUrl: 'views/group.html',
-                               controller: 'EntityCtrl',
-                               controllerAs: 'entityCtrl'
-                       })
-                       .when('/module/:id', {
-                               templateUrl: 'views/module.html',
-                               controller: 'EntityCtrl',
-                               controllerAs: 'entityCtrl'
-                       })
-                       .when('/class/:id', {
-                               templateUrl: 'views/class.html',
-                               controller: 'EntityCtrl',
-                               controllerAs: 'entityCtrl'
+                               templateUrl: 'views/index.html',
+                               controller: 'IndexCtrl',
+                               controllerAs: 'indexCtrl'
                        })
-                       .when('/classdef/:id', {
-                               templateUrl: 'views/classdef.html',
+                       .when('/doc/:id', {
+                               templateUrl: 'views/doc.html',
                                controller: 'EntityCtrl',
                                controllerAs: 'entityCtrl'
                        })