forked from ~ulysseskao/xdashangular

Dennis Kao
2016-04-26 f58eed4ff744969bc10af8ef1c4bed42c1e31eb0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//= wrapped
 
angular
    .module("xdashangular.index")
    .controller("MainController", MainController);
 
function MainController($scope, contextPath, $rootScope) {
    var vm = this;
 
    console.log(contextPath);
 
    $rootScope.$on('$stateNotFound',
        function(event, unfoundState, fromState, fromParams){
            console.log(unfoundState.to); // "lazy.state"
            console.log(unfoundState.toParams); // {a:1, b:2}
            console.log(unfoundState.options); // {inherit:false} + default options
        });
}