Adding the component

We just created our very first Angular component! However, before we can test it, we need to properly add it into our Angular application. This basically means that we'll have to reference its path(s), class(es), and pseudo-element(s) to one or more already existing files, depending on the component role. This is something that we'll always need to do whenever we create a component, so it's really important to pay close attention to all the required steps.

In most cases, such as this one, the affected files won't be more than two: the AppModule and the template file of the parent component that will contain the one that we just made. In our specific scenario, we want the QuizListComponent to be shown as part of the HomeComponent, so we'll put it into the home.component.html template file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.10.45