Skip to main content

Posts

Featured

How to create a new component and routing in angular

How to create a new component and routing in angular  Creating the Angular 8 Application Run this command  -  $ ng new frontend You will be propmted if  Would you like to add Angular routing?  Enter  y . And  Which stylesheet format would you like to use?  Select  CSS . You can start developing by the command   - $ ng serve You can access your application by calling the url  - : http:// localhost:4200 Creating an Angular 8 Module $ ng generate module auth --routing this command will make a directory for the angular component module Generating Angular 8 Components Next, we'll generate two components for the login and registration inside the  auth  module. In your terminal, run the following command: $ ng generate component auth/register $ ng generate component auth/login src/app/auth/auth.module IN auth module.ts import { NgModule } from '@angular/core'; import { CommonMo...

Latest posts