I am new to Ionic and have a bit of struggle with basic things. That’s my simplest use case. I installed latest ionic framework and created simple “tabs” project:
ionic start tabsApp tabs
After that I added a new ‘test’ page to it:
cd tabsApp
ionic g page Test
Then I added the same kind of links to existing “About” page and to newly created “Test” page to the home.html:
<button [navPush]="aboutPage">About Page</button>
<button [navPush]="testPage">Test Page</button>
and modified home.ts a bit to import two pages like that:
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { TestPage } from '../test/test';
import { AboutPage } from '../about/about';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
testPage = TestPage;
aboutPage = AboutPage;
constructor(public navCtrl: NavController) {
}
}
Now when I run ionic serve I see home page in a browser and can click on both links. The problem is that link to About page opens About page but link to Test page produces the following Runtime Error:
Uncaught (in promise): Error No component factory found for TestPage, Did you add it to @NgModule.entryComponents? ...
What I am doing wrong? From what I can see the main difference between about and test pages is that test page has test.module.ts in addition to test.ts and test.ts has @IonicPage() decorator while about.ts does not. What do I need to modify in that simple example to make navigation to that page working?