I am using AngularJS ui-router to go to different pages. I have a button that submits a form but I also want it to take me to a different page upon submission. So I tried to do something like this:
Approach 1, button
<button href="#anotherPage" type = "submit" ng-click = "someFunction()" class = "btn btn-default">Go to another page</button>
Typically, this is done in a link, so I also tried this:
Approach 2, link
<a href="#anotherPage" type = "submit" ng-click = "someFunction()" href="#results" class = "btn btn-default">Go to another page</a>
Approach 1 doesn't work because href doesn't work with buttons, approach 2 takes me to the other page but does not submit. What is the cleanest way to do this?