Thursday, September 8, 2016

23. Building Single Page Apps

Will explore Routers which are used in building Single Page applications.

The first step to building SPA is to enable routing. THis involves three steps.

1. Need to add a reference to the router script in index.html
This is because routing is not part of the core of the angular script. Thus, need to add it explicitly.

2. Set <base href>

3. Register router providers
in main.ts,

download seep app. angular-RC5-SPA.

import {ROUTER_PROVIDERS} from '@angular/router'

Configuring Routes

ss




No comments:

Post a Comment