Can't get a navigation to another page working

I created a new page with
ionic page g SlidesVorrat
imported it in home.ts
import {SlidesVorrat} from '../slides-vorrat/slides-vorrat';
and tried to reach it (button calls function goto()) with:
> @Component({
> selector: ‘page-home’,
> templateUrl: ‘home.html’
> })
> export class HomePage {
> constructor(public navCtrl:NavController) {
> }
> goto(){
> this.navCtrl.setRoot(SlidesVorrat);
> }
> }

I get:
ORIGINAL EXCEPTION: No component factory found for SlidesVorrat

Don’t really know how to solve this… Any tips? Must be something in the new ionic again, but I didn’t find anything about this in release notes…

I think u should also mention SlidesVorrat in NgModule declarations.

1 Like

Wow, thanks.

Had to find the right place first (which is src/app/app.module.ts for those looking).

How am I supposed to know something like this? I used exactly the same steps like two days ago.

1 Like