ui-router: Trigger state reload from ui-sref

Is it possible to add a reload option to the ui-sref directive, just like the option within the options of $state.go(to, params, options). The directive would simply check whether the option is set and use it in the internal call of $state.go.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

For the record, you can use the ui-sref-opts="{reload:true}" attribute to achieve that.

data-ui-sref-opts=“{reload:true}” is working for me. please try by adding data to
ui-sref-opts=“{reload:true}”

So, my issue was entirely a misunderstanding on my part! The service I was calling in the resolve statement returned a promise, not a function that returned a promise. So, being a singleton and all… Anyways, cleared that up and everything now works as expected! Just thought I’d leave this comment for anyone else that might have the same problem: Make sure that your service returns a function that returns a promise!