Say in a controller function, something like this:
$scope.fakeChangeState = function() {
$state.go('stay right here and do nothing');
}
And then call it when a button is pressed:
<button ng-click="fakeChangeState()">click</button>
Is something like that possible?
There is a directive that I want to activate when some buttons on the site are clicked. The directive is activated using "$stateChangeStart".
The directive activates just fine when navigating to another page using, for example, the navigation bar. However, there are buttons not part of the navigation, that only change the view (i.e. they edit the content on the page without changing state when they are clicked).
How do we activate the state change directive, without making it change state?