Adelin Adelin - 1 year ago 136
AngularJS Question

Otherwise on StateProvider

Using angular-ui-router, How can I use the otherwise method on $stateProvider or how can I use it at all ?

Answer Source

You can't use only $stateProvider.

You need to inject $urlRouterProvider and create a code similar to:


The /otherwise url must be defined on a state as usual:

    .state("otherwise", { url : '/otherwise'...})

See this link where ksperling explains

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download