Skip to content

Commit bea0959

Browse files
committed
update readme
1 parent 5d7a00e commit bea0959

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ function($middlewareProvider)] {
8989
this.redirectTo('/another-path', {
9090
redirectFrom: 'current-path'
9191
});
92+
93+
// If you are using ui.router,
94+
// you can also change transitionTo options
95+
this.redirectTo('another-state-name', null, { reload: false });
9296
},
9397

9498
/** Continue, but log the parameters */
@@ -203,7 +207,9 @@ function($middlewareProvider)] {
203207
204208
* `this.next()` **must be called** to resolve the middleware and either go to the next middleware or resolve the route
205209

206-
* `this.redirectTo(<string>, [params])` can be called to immediately redirect to a given path _(ngRoute)_ or state name _(ui.router)_.
207-
An optional params object can be provided which will be used to populate query parameters _(ngRoute)_ or `$stateParams` _(ui.router)_.
210+
* `this.redirectTo(dest [,params [,options]])` can be called to immediately redirect
211+
* **dest** (required): A path _(ngRoute)_ or state name _(ui.router)_ to redirect to
212+
* **params** (optional): A params object to be used to populate query parameters _(ngRoute)_ or `$stateParams` _(ui.router)_
213+
* **options** (optional): An object of [transitionTo](https://github.com/angular-ui/ui-router/wiki/Quick-Reference#statetransitiontoto-toparams--options) options (only used with ui.router)
208214

209215
* `this.params` is an object that contains the current route parameters

0 commit comments

Comments
 (0)