I am trying to get the button when clicked on to go to a second page in the app but I cannot figure out how to do so. (I am new to Ionic but have been stuck on this for hours)
This is the HTML in home.page.html:
<ion-header>
<ion-toolbar>
<ion-title>
The God Taco
</ion-title>
<ion-buttons end>
<button (click)="gotoAbout()">
About
<ion-icon name="information-circle-outline"></ion-icon>
</button>
</ion-buttons>
</ion-toolbar>
</ion-header>
This is the code in home.page.ts:
import { Component } from '@angular/core';
import { ToastController } from '@ionic/angular';
import { NavController } from '@ionic/angular';
import { AboutPage } from './about.page';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
gotoAbout() {
this.navCtrl.push('AboutPage');
}
Also the folders look like this:
![1]
[link]https://i.stack.imgur.com/h6Dzk.jpg
ERROR in src/app/home/home.page.ts(4,27): error TS2307: Cannot find module './about.page'. [ng] src/app/home/home.page.ts(12,1): error TS2304: Cannot find name 'gotoAbout'.
When the recompiling this is the error in the terminal.