forked from thedevankit/Angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c890f42
commit 203e617
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
+ [Angular common errors and features](#Angular-common-errors-and-features) | ||
+ [Trends in web technology](#Trends-in-web-technology) | ||
+ [Useful Code snippet](/UsefulCode) | ||
+ [Angular Optimization and Hacks](/Angular-Optimization-And-Hacks) | ||
+ [Angular Optimization and Hacks](#Angular-Optimization-And-Hacks) | ||
+ [Interview Questions](#Interview) | ||
|
||
### Installing Angular CLI: | ||
|
@@ -320,10 +320,16 @@ | |
|
||
## Angular Optimization And Hacks | ||
1. Creating Modules for lazy loading | ||
Generates Module, component and route for the component. | ||
Generates Module, component and route for the component. | ||
``` | ||
ng generate module --module aap.module --route component component_name | ||
ng generate module --module aap.module --route component component_name | ||
``` | ||
2. Optimization of angular app | ||
Angular apps can be optimized by removing the unused modules and references. | ||
That can be done by setting sourceMap: True and NameChunks: true | ||
Using **source-map-explorer** we can verify the bundle size and optimized it. | ||
`npm i [email protected]` | ||
Details: https://www.npmjs.com/package/source-map-explorer/v/1.7.0 | ||
|
||
## How can I support / Contributing | ||
Your contributions to the repo are welcome. For major changes, please open an issue first to discuss what you would like to change. | ||
|