How can I change the route.state using ng-click instead of a link applying ui-sref.
I've tried this:
<button ng-click="selectDir(file.fullPath)">set</button>
with
$scope.selectDir = function(location) { options.storageLocation = location; $route.current = 'recorder.options'; }
But it doesn't work. Any ideas?
Check out the ui-router documentation wiki.
The best solution is to use $state.go()
. e.g., $state.go('recorder.options')
Here's the link to the specific function in the documentation: https://github.com/angular-ui/ui-router/wiki/Quick-Reference#stategoto--toparams--options
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With