nitweb/angular: add /classdef/:full_name page
[nit.git] / share / nitweb / javascripts / nitweb.js
index 666ee60..e426fea 100644 (file)
  */
 
 (function() {
-       angular.module('nitweb', ['ngRoute', 'ngSanitize'])
+       angular.module('nitweb', ['ngRoute', 'ngSanitize', 'entities'])
 
        .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('/classdef/:id', {
+                               templateUrl: 'views/classdef.html',
+                               controller: 'EntityCtrl',
+                               controllerAs: 'entityCtrl'
+                       })
                        .otherwise({
                                redirectTo: '/'
                        });