You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For production I need to use http server instead of ng serve. But the routing is not working with http server, the same was working with ng serve.
Tried to solve this problem by implementing HashLocationStrategy which adds # to the routes by adding HashLocationStrategy to AppModule providers.
and added the corresponding import
import { HashLocationStrategy, LocationStrategy } from '@angular/common';
But this didn't solved the problem only the root URL works, cannot navigate into other links.
The text was updated successfully, but these errors were encountered:
vishal1997
changed the title
Angular 2 routing only works in ng serve but not nodemon
Angular 2 routing only works in ng serve but not http server
Oct 9, 2017
For production I need to use http server instead of ng serve. But the routing is not working with http server, the same was working with ng serve.
Tried to solve this problem by implementing HashLocationStrategy which adds # to the routes by adding HashLocationStrategy to AppModule providers.
and added the corresponding import
import { HashLocationStrategy, LocationStrategy } from '@angular/common';
But this didn't solved the problem only the root URL works, cannot navigate into other links.
The text was updated successfully, but these errors were encountered: