I\'m using the ionic cli to generate the page using this command
ionic generate page login
ionic g page login
then i get this error in browser<
There is
IonicModule.forRoot(MyApp)
.
Github link here.
export class IonicModule {
/**
* Set the root app component for you IonicModule
* @param {any} appRoot The root AppComponent for this app.
* @param {any} config Config Options for the app. Accepts any config property.
* @param {any} deepLinkConfig Any configuration needed for the Ionic Deeplinker.
*/
static forRoot(appRoot: any,
config: any = null,
deepLinkConfig: DeepLinkConfig = null): ModuleWithProviders {
For bootstrapping a single page you could try IonicPageModule.
@NgModule({
imports: [IonicModule],
exports: [IonicModule]
})
export class IonicPageModule {
static forChild(page: any): ModuleWithProviders {
Change your import to :
imports: [
IonicPageModule.forChild(Login),
]
Update:
Relevant links:IonicPage, IonicPageModule.
According to the google docs shared in discussion here this is introduced in ionic 3
for lazy loading of ionic pages.