amitdar
amitdar

Reputation: 927

UI-Router: Change part of the url

I'm using Angular's UI-router. All my routes looks like that: /:name/.... for example /:name/test/:id, /:name/logs, /:name/list/:id

I want to change the name part when I click on a button, and reload the page. How can i do that globally without knowing exactly what route I'm in ?

Upvotes: 0

Views: 52

Answers (1)

liamness
liamness

Reputation: 742

$state.go($state.current, { name, 'newValue' });

Or something similar with ui-sref.

Upvotes: 2

Related Questions