Currently, I am in the process of creating an Angular 2 application that utilizes html5 routing. A challenge that I have encountered revolves around nested routes. Specifically, while a route like /route1
functions properly, issues arise when attempting to access a child route such as /route1/child-route
.
In order to serve the files, I rely on browserSync
and make use of middleware for redirecting to index.html. Upon investigation, it seems that the root of the problem lies within compiled TypeScript files and SystemJS configuration; particularly with relative urls. For instance, when the file app.js
is requested, the server attempts to locate it at /route1/app.js
. Are there any suggestions or solutions that might help me overcome this obstacle?