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

2
  • 1
    You can use $state.go use for navigate to another state.Dont forget to inject '$state' in controller eg:- $state.go("Tab1.Main"); Commented Feb 2, 2017 at 12:08
  • yap, use $state.go(path) Commented Feb 2, 2017 at 14:08

3 Answers 3

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

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

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);
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.