i'm trying angular2 router setup support deep linking. used use ui-router in angular 1.5 , kept state information right of '#'. i'm trying understand if angular2 router either @angular/router or @angular/router-deprecated can configured in way support behavior. i'm finding documentation refers hashlocationstrategy, can't import @angular/router-deprecated or @angular/router i'm not sure these examples still valid.
deep linking angular2 walk through
specifically can't import:
import {locationstrategy, hashlocationstrategry} 'angular2/router';
you should import '@angular/common':
main.ts:
import { bootstrap } '@angular/platform-browser-dynamic'; import { router_providers } '@angular/router-deprecated'; import { provide } '@angular/core'; import { locationstrategy, hashlocationstrategy } '@angular/common'; import { appcomponent } './app.component'; bootstrap(appcomponent, [ router_providers, provide(locationstrategy, {useclass: hashlocationstrategy}) ]);
reference: https://angular.io/docs/ts/latest/guide/router-deprecated.html