-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Nested roots not working using the browser`s adress bar #3517
Comments
It looks like your base href is the issue. Try setting it to '/'. |
Thank you. You have saved me weeks... |
Found the culprit:
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
OS?
Versions.
angular-cli: 1.0.0-beta.22-1
node: 6.9.2
os: win32 x64
Repro steps.
The log given by the failure.
The app compiles fine. The error is in Chrome, when using refreshing the webpage from the browser:
Uncaught SyntaxError: Unexpected token <
response is:

Mention any other details that might be useful.
My application uses an MVC server-side routing that points to ~/index.html.
<title>Title</title> Loading... <script type="text/javascript" src="inline.d41d8cd98f00b204e980.bundle.js"></script>Index.html looks like this:
Scripts mentioned live in the same directory as index.html. The thing is, as soon as I change the directory by nesting roots
<script type="text/javascript" src="**../**inline.d41d8cd98f00b204e980.bundle.js"></script> in order to get the script loaded, but naturally, the routes no longer work, and would ve a solution just for this depth of the application, when it would work. But at least it seems to point where the problem is, namely changing the directory seems to cause the problem.(by adding a one more '/' -> for instance when I change http://myApp/accounts to http://myApp/accounts/)
,I get the errors mentioned. Just to be explicit, routing within angular2 works good, the problem is when the request comes from browser/server.
Then I need to put something in the index.html, for instance:
The text was updated successfully, but these errors were encountered: