-
Notifications
You must be signed in to change notification settings - Fork 3k
API docs issues #3262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Try using All parameters are optional. See here https://ui-router.github.io/ng1/docs/latest/interfaces/url.urlrulehandlerfn.html |
The API for The docs for injectables -> The reason for this is: In angular-ui-router, we've always used $urlRouterProvider.otherwise(function ($injector, $location) {
return '/a/valid/url';
})); In core ui-router, we're dropping the |
Thanks for the clarification, I'll review the doc changes and refactor my code accordingly |
The example for
otherwise
in the docs seems to be incorrect. I tried the following:But this resulted in an error
Cannot read property 'stateService' of undefined
.I then moved the logic to the
run
cycle instead:This led to
Cannot read property 'go' of undefined
.Upon analysis of parameters, I found that a boolean value is inserted as the first parameter to the function. Changing to:
Finally did the trick.
So not sure what that first parameter is, but it's missing from the example. In addition, the
return
statement in the example is superfluous.Further, the docs here should probably state:
E.g. to instead of from.
The text was updated successfully, but these errors were encountered: