Hello,
okay. The use of a page as tag inside html is the same as for a custom component.
If you take a look to FirstPage.ts, then there is as part of @componet a selector like
@Component({
selector: 'page-first',
templateUrl: 'first.html'
})
In your html you use this selector like
<slide>
<page-first></page-first>
</slide>
That an angular componet is known as html tag you need to import the module of your component. In your case you should have a file that is called like first.module.ts. This file should export (at file end) FirstPageModule
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { FirstPage } from './first';
@NgModule({
declarations: [
FirstPage
],
imports: [
IonicPageModule.forChild(FirstPage )
],
})
export class FirstPage Module { }
FirstPageModule is what you need to import in app.module.ts (for eager loading) or in whatever.module.ts (for lazy loading)
import { FirstPageModule } from 'yourPath';
If you use VisualCode or similar, then there are extensions that helps with correct paths.
Last step. Add FirstPageModule to @NGModule imports section of app.module.ts or whatever.module.ts
@NgModule({
declarations: [
MyApp
],
imports: [
HttpModule,
BrowserModule,,
IonicModule.forRoot(MyApp),
FirstPageModule
],
.....
The same principle is used for custom components. You can create a custom component and copy all code of ts and html (without <ion-conetn) in it and use it in same way. May better, because I have read anywhere that 2 ion-contents could cause problems.
Best regards, anna-liebt