How to update href with ui-sref when parameters change Angular ui-router

时间:2015-05-04 19:42:57

标签: angularjs angular-ui-router

I have an element like so

<a ui-sref="State.child"></a>

I then go to the state that contains this template and my url looks like so

http://url?q=query

I can click on the link and it works as expected. Inspecting it shows that the href attribute looks like

href='/child?q=query'

However in my state it is possible to update my state by changing the q param. eg.

http://url?q=newquery

but the href in the tag still has the old value of q. Is there anyway to update this value?

0 个答案:

没有答案