How to navigate to page using ui-sref

I have a login page and signup page. I want to navigate to Sign Up page by clicking ‘Create new account.’ (not a button) text. I found it can be done using ui-sref & i didn’t find any example for ionic 2.

I think that’s a pretty mystifying UX, because the user doesn’t know they’re supposed to click on that text unless you somehow style it to indicate that, at which point you basically have a button, but anyway:

<span (click)="gotoSignup()">Create new account</span>

constructor(private _nav: NavController) {
}

gotoSignup(): void {
  this._nav.setRoot(SignupPage);
}
1 Like

Thank you! It worked.