Last active
August 21, 2018 14:26
-
-
Save ldmarz/e038c13909b5673d7048477142d96fc6 to your computer and use it in GitHub Desktop.
Example of lazy loaders on Angular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { HomePage } from '../pages/home/home'; | |
| @NgModule({ | |
| declarations: [ | |
| MyApp, | |
| HomePage | |
| ], | |
| . . . | |
| entryComponents: [ | |
| MyApp, | |
| HomePage | |
| ] | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { IonicPage } from 'ionic-angular'; | |
| @IonicPage() | |
| @Component( ... ) | |
| export class HomePage { ... } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { NgModule } from '@angular/core'; | |
| import { IonicPageModule } from 'ionic-angular'; | |
| import { HomePage } from './home'; | |
| @NgModule({ | |
| declarations: [HomePage], | |
| imports: [IonicPageModule.forChild(HomePage)], | |
| }) | |
| export class HomePageModule { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @NgModule({ | |
| declarations: [ | |
| MyApp | |
| ], | |
| . . . | |
| entryComponents: [ | |
| MyApp | |
| ] | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ionic start lazy-loader blank |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment