i started learning angular2, , finished hero tutorial. have few questions in regards routing.
is appcomponent supposed used routeconfig, , initial selector? better extract router out of appcomponent? @angular/router-deprecated deprecated..?
there's official style guide covers best practices. might find answer there.
from point of view, makes totally sense declare routeconfig
in component handles routing in view (meaning implementing <router-outlet>
in template).
if take @ of used angular2 seeds, find main.ts
or bootstrap.ts
handles, well..bootstrapping of app. sets fundamental providers , defines entry point, in cases app.component
. if in case "entry point" else before or after want setup route configuration (and template has router-outlet
, navigation stuff) seperate of course, in cases that's main purpose of component.
and router-deprecated
package: yes it's "actually" deprecated (why call way otherwise? ;)).
but since new package not feature complete , missing stuff might not want miss, offer support "old" router.