Merge: modelize_class: Remove an unnecessary pre-condition
[nit.git] / share / nitweb / javascripts / nitweb.js
index 666ee60..9dac463 100644 (file)
  */
 
 (function() {
-       angular.module('nitweb', ['ngRoute', 'ngSanitize'])
-
+       angular.module('nitweb', ['ngRoute', 'ngSanitize', 'angular-loading-bar', 'entities', 'docdown', 'index', 'metrics'])
+       .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) {
+               cfpLoadingBarProvider.includeSpinner = false;
+       }])
        .config(function($routeProvider, $locationProvider) {
                $routeProvider
                        .when('/', {
-                               templateUrl: 'views/index.html'
+                               templateUrl: 'views/index.html',
+                               controller: 'IndexCtrl',
+                               controllerAs: 'indexCtrl'
+                       })
+                       .when('/docdown', {
+                               templateUrl: 'views/docdown.html',
+                               controller: 'DocdownCtrl',
+                               controllerAs: 'docdownCtrl'
+                       })
+                       .when('/doc/:id', {
+                               templateUrl: 'views/doc.html',
+                               controller: 'EntityCtrl',
+                               controllerAs: 'entityCtrl'
                        })
                        .otherwise({
                                redirectTo: '/'