Should I use click events followed by $state.transitionTo rather than
hrefs when using ui-router?
I am currently using a link like this to cause a transition.
<a href="/questions/5"><span class="ng-binding">1</span></a>
With ui-router would it be possible for me to replace the href with a
click event that fired a function in my controller passing in the question
number and then have the controller trigger a change of state using the
$state.transitionTo ?
If so then when using ui-router is this better than haing href's placed in
my HTML ?
No comments:
Post a Comment