Every attempt to lazy load a component on a non-lazy loading page has ended in error for me.
//app.module.ts
import {LoginPage} from '../pages/login/login';
@NgModule({
declarations: [
MyApp,
LoginPage
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
HttpClientModule
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
LoginPage
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
]
})
//login.module.ts
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { LoginPage } from './login';
import {LoginFormComponent} from '../../components/login-form/login-form';
@NgModule({
declarations: [
LoginPage,
LoginFormComponent
],
imports: [
IonicPageModule.forChild(LoginPage),
],
})
export class LoginPageModule {}
This keeps resulting in errors.
please add a @pipe/@directive/@component annotation.
How can I create a lazy loading component in a non-lazy loading page if it's possible?