February 2019
Beginner
694 pages
18h 4m
English
Our first task is to create a NavbarComponent class that will have the sole responsibility of rendering the navigation bar at the top of the screen. To do this, we will create a navbar.component.ts file and a navbar.component.html file in our app directory. This can easily be accomplished using the Angular-CLI, by executing the following on the command line:
ng generate component navbar
This command will create a new directory in the src/app folder, and generate the necessary files for our new component, including the main .ts file, a .css file, an .html file, as well as a .spec.ts file for testing. It will also generate standard code for creating the component, as well as modifying the app.module.ts file to automatically ...
Read now
Unlock full access