2 * Copyright 2016 Alexandre Terrasa <alexandre@moz-code.org>.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 angular
.module('nitweb', ['ngRoute', 'ngSanitize', 'entities', 'index'])
20 .config(function($routeProvider
, $locationProvider
) {
23 templateUrl
: 'views/index.html',
24 controller
: 'IndexCtrl',
25 controllerAs
: 'indexCtrl'
27 .when('/package/:id', {
28 templateUrl
: 'views/package.html',
29 controller
: 'EntityCtrl',
30 controllerAs
: 'entityCtrl'
33 templateUrl
: 'views/group.html',
34 controller
: 'EntityCtrl',
35 controllerAs
: 'entityCtrl'
37 .when('/module/:id', {
38 templateUrl
: 'views/module.html',
39 controller
: 'EntityCtrl',
40 controllerAs
: 'entityCtrl'
43 templateUrl
: 'views/class.html',
44 controller
: 'EntityCtrl',
45 controllerAs
: 'entityCtrl'
47 .when('/classdef/:id', {
48 templateUrl
: 'views/classdef.html',
49 controller
: 'EntityCtrl',
50 controllerAs
: 'entityCtrl'
52 .when('/property/:id', {
53 templateUrl
: 'views/property.html',
54 controller
: 'EntityCtrl',
55 controllerAs
: 'entityCtrl'
57 .when('/propdef/:id', {
58 templateUrl
: 'views/propdef.html',
59 controller
: 'EntityCtrl',
60 controllerAs
: 'entityCtrl'
65 $locationProvider
.html5Mode(true);