Search code examples
angularjsangular-ui-routerui-sref

How can I reload the same page twice when I click 'ui-sref' by angular-ui-router


I'm using angular-ui-router to manage router of my webapp, here got a question...

How can I do reload when I click the same link, currently when I click a link twice that just load one time...


Solution

  • Probably the cleaner approach would be the following :

    <a data-ui-sref="awesomeStateName" data-ui-sref-opts="{reload: true}">Details State</a>
    

    We can reload the state from the HTML only.