Reputation: 43
I want to navigate from one page to another page when I'm click the 'Sorgula' button. I wrote ng-click function and add controller but doesn't work.
[![enter image description here][1]][1]
Upvotes: 1
Views: 1315
Reputation: 8712
Remove the href="" where you have use ng-click to navigate to another route
in your case I mark it in red circle.
Then in your go function add code like below
$scope.go = function(path) {
$location.path(path);
}
Upvotes: 1
Reputation: 234
You can use $state.go use for navigate to another state.Dont forget to inject '$state' in controller eg:- $state.go("Tab1.Main");
Upvotes: 1
Reputation: 940
As per documentation for ngClick it requres expression to execute as mentioned in documentation
Instead of expression you are providing controller's action so You should probably use the ngHref directive along with the ngClick:
This solution is already provided at following link
Upvotes: 1