Description
OS?
Windows 10.
Versions.
angular-cli: 1.0.0-beta.22-1
node: 6.9.2
os: win32 x64
Repro steps.
Created an app using ng new. Pasted und updated my code that worked before using angular-CLI so that there are no more errors.
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 <
Mention any other details that might be useful.
My application uses an MVC server-side routing that points to ~/index.html.
Index.html looks like this:
<script type="text/javascript" src="styles.5f7f16a82a4f91544984.bundle.js"></script>
<script type="text/javascript" src="scripts.4cc5cca4ad2b0c20ad9d.bundle.js"></script>
<script type="text/javascript" src="vendor.bdd774df3cfec44bf929.bundle.js"></script>
<script type="text/javascript" src="main.b68070036956df1649d5.bundle.js"></script>
Scripts mentioned live in the same directory as index.html. The thing is, as soon as I change the directory by nesting roots
(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: