I\'m following the simple quickstart app from the Angular2 docs and I\'m using a spring backend to run it. My problem is that the angular router ditched the hashtag from the
Angular2 <= RC.5
The ROUTER_PROVIDERS
need to be added before LocationStrategy
otherwise your previously added LocationStrategy
gets overridden.
bootstrap(
TestComponent,
[
ROUTER_PROVIDERS,
// must be listed after `ROUTER_PROVIDERS`
provide(LocationStrategy, { useClass: HashLocationStrategy })
]
);
delete this line
providers: [ROUTER_PROVIDERS]
from TestComponent