I just upgraded from Angular2 RC1 to RC4.
Before I used:
provide(LocationStrategy, {useClass: HashLocationStrategy})
However, after upgraded to RC4, the provide shows as deprecated.
I did not find any documentation on this.
Does anyone have an idea about what happened?
As was pointed out in the comments above, you should now just use an object with provide
and useClass
properties, such as in the following:
bootstrap(App, [
CookieService,
AuthService,
WindowService,
COMMON_DIRECTIVES,
ROUTER_DIRECTIVES,
HTTP_PROVIDERS,
provideRouter(AppRoutes),
{ provide: LocationStrategy, useClass: HashLocationStrategy }
]);
This example is from my Github project using Angular2, Bootstrap 4, OAuth2, and Webpack. I've been updating it as the various alpha, beta, and RC releases of Angular2 have been put out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With