-
Notifications
You must be signed in to change notification settings - Fork 19
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
Path-based routing #52
base: master
Are you sure you want to change the base?
Conversation
Fix for Issue konsoletyper#46: Some Unicode sequences broken in templates (konsoletyper#47)
…strategy. Updated LinkComponent to utilize routing strategy.
These issues are fatal and should be resolved before I can accept this PR |
Thanks for the feedback! I will start working on the html:link fix. I may need advice but I will give it a shot. The base URI is a standard requirement from similar frameworks. (See this page) Perhaps it can be simplified or automated, if the app is deployed at the root. If the app is not deployed at the root there needs to be some way to specify the app root, otherwise resources will be loaded relative to the path, which won't work for deep linking. I will investigate both and let you know what I find. |
Quick update: The html:link support is almost ready. I will investigate automating base href support after that. |
html:link support is complete and added to the PR. |
I'm investigating how to reduce or eliminate the 'base href' requirement. I am testing changes that make it much easier:
No changes are required to index.html in either case. Does this seem acceptable? |
The base href fix is checked in now too. No base href is needed in index.html, it is set by the call to Routing.usePathStrategy. The default is "/" if no argument is provided, or you can pass the path if it is different (like "ts" if the app is deployed at "/ts"). |
@konsoletyper , all of your concerns have been addressed. Could you please merge this? I have been using it for weeks on several Flavour projects and it seems stable. |
(This addresses issue #51)
This PR adds Path-based routing to Flavour.
The existing Hash-based routing has been refactored into a HashRoutingStrategy.
Routing now redirects to a strategy. The strategy can be set to path-based via Routing.usePathStrategy().
PathRoutingStrategy implements the path-based routing.
Developers need to do 3 things:
<base href="https://frequal.com/tea-sampler/" />
<error-page> <location>/index.html</location> </error-page>
There is one limitation at present: