sprintcube / angular-routing-demo

A basic example of Routing and Guards in Angular

Home Page:https://angular-routing.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Album App

A small app using Angular to demonstrate the routing.

Angular Concepts

In this demo, following concepts are used.

  • Components
  • Services
  • Observables
  • Interfaces
  • Routing
  • Guards

Protected routes

In this demo, there is an AuthGuard to protect few routes from unauthorized access. To do so, there is a fake authentication service which logs in and out the user.

The album's details page and secret page can not be viewed without login. Simply, click on login button and these 2 routes will be available.

Libraries

This demo uses following third party libraries.

Development server

To install it on your local server, clone this repository and run npm install. Once the installation is completed, run ng serve for a dev server. Navigate to http://localhost:4200/.

This project was generated with Angular CLI version 6.0.0-rc.4.

About

A basic example of Routing and Guards in Angular

https://angular-routing.netlify.com/


Languages

Language:TypeScript 61.9%Language:HTML 27.6%Language:JavaScript 6.8%Language:CSS 3.8%