Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Angular Universal #20

Open
edinfazlic opened this issue Mar 13, 2020 · 0 comments
Open

Migrate to Angular Universal #20

edinfazlic opened this issue Mar 13, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@edinfazlic
Copy link
Owner

Reason 1:
Currently, open graph protocol information is hardcoded in index.html.
In order to allow it to be dynamic, there are several options.
One is to introduce server side rendering (SSR) so the index page, at least, is built and prepared ahead of time.
This would allow for information to be read from the index page, before the rest of angular/pages/content have been loaded yet. Reading meta allows the application to have a nice touch when sharing (image, description, title, etc.)

However, pay attention that introducing Angular Universal would break hashLocationStrategy (that strategy represents: when refresh is hit on the page, the server is querried for that path, and since there is angular routing introduced, most of those/or all routes don't exist on the server, and server would return 404. Hash location strategy adds # before angular routes, so that refresh is allowed and will not break the website.)

@edinfazlic edinfazlic added the enhancement New feature or request label Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant