1

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]

enter image description here

enter image description here

enter image description here

cengavera
  • 43
  • 1
  • 9

3 Answers3

1

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

Community
  • 1
  • 1
Aqdas
  • 868
  • 4
  • 16
  • 57
1

You can use $state.go use for navigate to another state.Dont forget to inject '$state' in controller eg:- $state.go("Tab1.Main");

Wintergreen
  • 236
  • 1
  • 9
1

Remove the href="" where you have use ng-click to navigate to another route

in your case I mark it in red circle.

enter image description here

Then in your go function add code like below

$scope.go = function(path) {
  $location.path(path);
}
coder
  • 8,346
  • 16
  • 39
  • 53