I have been trying to work with the code, I added the button but I don't know how to link it to another page when clicking on it.
ts file code. export class HomePage { constructor(public navController: NavController) { } goToLoginPage(){ this. navController. navigateForward(LoginVCPage) // Getting error at this line. } }
Set to "clear" for a transparent button that resembles a flat button, to "outline" for a transparent button with a border, or to "solid" for a button with a filled background. The default fill is "solid" except inside of a toolbar, where the default is "clear" .
html
<ion-button (click)="nextpage()">Home</ion-button>
ts
import { Router } from '@angular/router';
constructor(private route: Router) { }
nextpage() {
this.route.navigate(['/home']);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With