I (which uses dynamic states based on the state system of the future of UI-router-hiring a AngularJS project I am working) . Future state machinery works well except: If I use the'm not using, and how far any indication urlRouterProvider.otherwise ()
future state routing in application config does not work anymore
app.config ([ '$ futureStateProvider', '$ controllerProvider', '$ stateProvider', '$ urlRouterProvider', function ($ futureStateProvider, $ controllerProvider, $ stateProvider, $ urlRouterProvider) {$ urlRouterProvider. when ( "" "/ start"); $ urlRouterProvider .when ( "/", "/ start"); $ urlRouterProvider.otherwise ( "/ error"); / * !!! - & gt; no way for the future state possible anymore * / $ StateProvider Kstate ( ' Start ', {url: "/ start", templateUrl: "start.html", controller:' DemoMainCtrl '}) .state (' error ', {url: "/ error", templateUrl: "error.html"})... Some states ... / * Here comes in the form of code examples for futute State setup: http://christopherthielen.github.io/ui-router- additional / examples / futures / index # # when I $ urlRouterProvider.otherwise ( "/ error") * /
$ urlRouterProvider.otherwise ( "/ error") ;
How to use correctly or any other automated error routing mechanism (i.e. a state or url is not available, then automatic route for an error view)?
Rotating around, otherwise work in 0.0.11 +
Comments
Post a Comment