forked from ~ulysseskao/xdashangular

Dennis Kao
2016-04-26 f58eed4ff744969bc10af8ef1c4bed42c1e31eb0
grails-app/assets/javascripts/xdashangular/index/controllers/mainController.js
@@ -4,7 +4,15 @@
    .module("xdashangular.index")
    .controller("MainController", MainController);
function MainController($scope, contextPath) {
function MainController($scope, contextPath, $rootScope) {
    var vm = this;
    console.log(contextPath)
    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
        });
}