nitweb: move ui-router configuration to doc-down module
[nit.git] / share / nitweb / javascripts / docdown.js
index 3a352ac..0095c81 100644 (file)
        angular
                .module('docdown', ['model', 'ngSanitize'])
 
+               .config(function($stateProvider, $locationProvider) {
+                       $stateProvider
+                               .state('docdown', {
+                                       url: '/docdown',
+                                       templateUrl: 'views/docdown.html',
+                                       controller: 'DocdownCtrl',
+                                       controllerAs: 'docdownCtrl'
+                               })
+               })
+
                .controller('DocdownCtrl', ['$sce', '$scope', '$location', 'DocDown', function($sce, $scope, $location, DocDown) {
 
                        this.updateSnippet = function() {