-
Notifications
You must be signed in to change notification settings - Fork 216
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
Ionic template SPA server not working properly #249
Comments
Thanks for reporting the issue. It was a quick workaround but since it causes issues with routing, I have to find something else... |
I posted an issue on the related ionic plugin: ionic-team/cordova-plugin-ionic-webview#77 |
@sinedied , I think this post might be somehow related as they talk about the issues of base href: angular/angular#13948 |
The only workable fix for this until (if) ionic-team/cordova-plugin-ionic-webview#77 is fixed, is to remove |
@ALander26 I just tried with the But on the same idea, I tried:
which works as it now uses |
After a bit of research, I just found that Seems the best way to fix this I think 😄 |
@sinedied Indeed seems like the best solution. I was already thinking of doing it manually before building. |
Use <base href="/"> with override for Cordova projects (fixes #249)
I'm submitting a...
[x ] Bug report
[ ] Feature request
[ ] Documentation issue or request
Current behavior
If I create a test component (doesn't matter what it does) and add a routing example like below:
Going to http://localhost:4200/test/randomId doesn't work. All of the script tags are getting 404 error because its trying to load them from "test" folder - http://prntscr.com/ifskud
However if I load the login component view first and the navigate to test component view, it works fine.
Environment
The issue only appears when working with Ionic generated templates.
Possible solution
I noticed that only Ionic generated templates have this in index.html:
Changing it to this seems to fix the issue
I was just wondering if this change might break something else as if there might be a specific reason Ionic templates use a different base href?
The text was updated successfully, but these errors were encountered: