routing is critical for every web framework architecture. ASP.net / JSP have server side routing built-in, dealing with http modules and handler. Angular changes from server side architecture to client side, with the routing as well. Angular2 did it one step further
official Angular2 Routing here: https://angular.io/docs/ts/latest/guide/router.html. following is quick view on how routing works in angular2.
1. setup base for the client side app.
client visit "index.html" and load it into browser, all the subsequent request routing is based on this root. treat this as a starting baseline for the client app.
src/index.html (base-href) => <head> => <base href="http://www.likecs.com/">
2. create new component.
ng g component home
3. import routing module into application & configure routing
app.module.ts => import { RouterModule, Router} from \'@angular/router\';
imports: [