Angular 4 Routing

  1. Install Latest version of NodeJs

  2. To check nodeJs version using command prompt

    npm -v

  3. Navigate to your project directory using command prompt

    cd project_name

  4. And start the application in browser using command prompt

    ng serve -o

  5. Application will get opened in the following url : http://localhost:4200/

Explanation

-> in folder src/ index.html contains the template header , footer and body section

-> style.css contains the template styles

-> in folder src/app i have created 4 components i.e ( home,login,register,notfound )

-> routing code is written in app.module.ts