1c - Brief Introduction To Angular
1. Refactor to use lazy loaded User module
2. Move all User related folders into the user module folder
3. Remove all references to Users in App module
src/app/app.module.ts
4. Change routes to lazy loaded routes
src/app/app-routing.module.ts
5. Add UserList component as feature module route
src/app/user/user-routing.module.ts
6. Declare UserList component in new User module
src/app/user/user.module.ts
7. Add button on App component to navigate to UserList or Home component
src/app/app.component.html
8. Run the application and inspect the lazy loaded JavaScript
Extras
1. Add extra project to CLI App
As of Angular CLI version 6+ you can now have multiple projects in an Angular app. It is early days and no support for sharing modules between apps and best practices or schematics made. That is what Nx can help with. You can read more on the Angular CLI limited docs https://github.com/angular/angular-cli/wiki/stories-multiple-projects
In the terminal run
2. Add npm package library to your app
Angular CLI v6 comes with library support via ng-packagr plugged into the build system we use in Angular CLI, together with schematics for generating a library.
https://github.com/angular/angular-cli/wiki/stories-create-library
In the terminal run
Last updated