I have noticed that, whenever a $state.go() is applied to a state with parameter(s) in AngularJS UI-Router, a new instance of the HTML content [for that view] is created each time. Not only the HTML content, but also the controller are being created as many times as newer params are appearing on the $stateParams after calling $state.go() in the program later on.
How do I stop new instances of HTML content and controller to stop appearing, while still passing the params to the $stateParams? I want to use the same controller, same scope and same HTML content for any data that $stateParams holds. Thank you very much in advance!
<div ui-view>content</div>, multiple instances go like<div ui-view>content</div><div ui-view>content</div>. This applies to anything that the UI-router creates. So you can use any fiddle you like, with a state containing a parameter in its url.