Angularjs ui router manual navigation
angular-ui-router, angularjs, javascript
Solution
you can use `$state.go` or `$state.transitionTo` (https://github.com/angular-ui/ui-router/wiki/Quick-Reference#statetransitiontoto-toparams--options)
controllers.controller("MyController", function($scope, $state){
$scope.go = function(){
$state.go('new-state');
};
});
Problem
I want to manually change the current state within my controller using the ui router. I have the following code at the moment: ``` <button ng-click="go()">Go</button> controllers.controller("MyController", function($scope){ $scope.go = function(){ //Manually change state }; }); ``` Is there something like ``` $uiRouter.changeState("mystate"); ? ``` Thanks in advance!