Merge: Added contributing guidelines and link from readme
[nit.git] / share / nitweb / javascripts / nitweb.js
index 9a4aa16..93b7c3a 100644 (file)
  */
 
 (function() {
-       angular.module('nitweb', ['ngRoute', 'ngSanitize', 'entities'])
+       angular.module('nitweb', ['ngRoute', 'ngSanitize', 'entities', 'index'])
 
        .config(function($routeProvider, $locationProvider) {
                $routeProvider
                        .when('/', {
-                               templateUrl: 'views/index.html'
+                               templateUrl: 'views/index.html',
+                               controller: 'IndexCtrl',
+                               controllerAs: 'indexCtrl'
                        })
                        .when('/package/:id', {
                                templateUrl: 'views/package.html',
                                controller: 'EntityCtrl',
                                controllerAs: 'entityCtrl'
                        })
+                       .when('/class/:id', {
+                               templateUrl: 'views/class.html',
+                               controller: 'EntityCtrl',
+                               controllerAs: 'entityCtrl'
+                       })
+                       .when('/classdef/:id', {
+                               templateUrl: 'views/classdef.html',
+                               controller: 'EntityCtrl',
+                               controllerAs: 'entityCtrl'
+                       })
+                       .when('/property/:id', {
+                               templateUrl: 'views/property.html',
+                               controller: 'EntityCtrl',
+                               controllerAs: 'entityCtrl'
+                       })
+                       .when('/propdef/:id', {
+                               templateUrl: 'views/propdef.html',
+                               controller: 'EntityCtrl',
+                               controllerAs: 'entityCtrl'
+                       })
                        .otherwise({
                                redirectTo: '/'
                        });