nitweb: move entity state configuration to entity module
authorAlexandre Terrasa <alexandre@moz-code.org>
Fri, 9 Jun 2017 18:33:28 +0000 (14:33 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Fri, 9 Jun 2017 18:33:28 +0000 (14:33 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

share/nitweb/javascripts/entities.js
share/nitweb/javascripts/nitweb.js

index 2f7c6f5..762b8fd 100644 (file)
        angular
                .module('entities', ['ngSanitize', 'ui'])
 
+               .config(function($stateProvider, $locationProvider) {
+                       $stateProvider
+                               .state('doc', {
+                                       url: '/doc/:id',
+                                       templateUrl: 'views/doc.html',
+                                       controller: 'EntityCtrl',
+                                       controllerAs: 'entityCtrl',
+                               })
+               })
+
                .factory('Model', [ '$http', function($http) {
                        return {
 
index 9584f08..1191c4d 100644 (file)
                                },
                            template : "<div></div>"
                        })
-                       .state('doc', {
-                               url: '/doc/:id',
-                               templateUrl: 'views/doc.html',
-                               controller: 'EntityCtrl',
-                               controllerAs: 'entityCtrl',
-                       })
                        .state({
                                name: '404',
                                url: '*path',