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
Angular's HTML5 mode overrides the default routing, so routes that appear valid only exist when you visit them after initializing the app.
This means if I were to set up an angular route called /about and tried going to localhost, then clicking on a link to /about, everything would work. But if I tried refreshing once I was on the localhost/about page, or going directly to localhost/about I would get a 404.
To fix this I will set all unspecified server routes to go to index.html. This will also require a rendering engine such as EJS to render the html page on request.
The text was updated successfully, but these errors were encountered:
Server now uses EJS rendering to serve html views. New structure should allow Jade support later on. Additionally, HTML5 mode is now supported. All un-specified server routes now redirect to index so the angular routing system handles them.
BREAKING CHANGE:
angular-fullstack:route and angular-fullstack:view will now generate views and routes in the views/partials folder.
For existing projects:
Please install generator-angular and use it's subgenerators for creating routes and views. They are exactly the same as the generators that you have been using. Example usage: yo angular:route helloworld.
For New projects:
Continue to use angular-fullstack route and view subgenerators.
The reason for this change in folder structure was to support server page rendering.
Closes#18, #17
Angular's HTML5 mode overrides the default routing, so routes that appear valid only exist when you visit them after initializing the app.
This means if I were to set up an angular route called
/about
and tried going tolocalhost
, then clicking on a link to /about, everything would work. But if I tried refreshing once I was on thelocalhost/about
page, or going directly tolocalhost/about
I would get a 404.To fix this I will set all unspecified server routes to go to index.html. This will also require a rendering engine such as EJS to render the html page on request.
The text was updated successfully, but these errors were encountered: