How to use this template?
Many of you ask which is the best way to use the template to build your app, and the answer is: IT DEPENDS!
If you only want to use some specific pages or components and you already have an existing Angular app, then I suggest you to go with option 2 so you don't have to waste time deleting the things you don't need.
This template is itself an Angular app, so you don't need to create another one. You can use the template as a base for your app and just delete the pages you don't want and add the ones missing.
How to do this? Let's assume you want to use some angular form controls from the Extended Controls page. Navigate to that section of the code:
- Copy the
extended-controlsfolder intro your project.
- Add the
ExtendedControlsComponentas a declaration of one of your Modules (like we do in
- Add the
extended-controlsroute to your Module (like we do in
- If the component injects any service, then also add it to your project.
- Add any component dependency. In this case it would be all the Material components modules that we use in this page, also reactive angular forms module. In this project we have a
src/app/shared/shared.module.tsthat exports all this shared dependencies so we can use them along the project.