I'm teaching myself Angular2 (the wave of the future, apparently) and I'm getting experimental. I followed Ibrahim Uludag's tutorial here:
http://www.ibrahimuludag.com/2016/01/angular2-and-visual-studio.html
and that works just fine. But I want to go one step further and use an MVC project instead of a TypeScript project as Ibrahim suggests. I'm using a simple structure (one controller, one view) and I've added the Angular2 JavaScript references to my view (along with header, body etc.). I had to prefix the filenames with a slash, otherwise the server interprets them as as controller / view references. That part works fine.
The problem I have is with this command:
System.config ({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import ('app/boot')
.then (null, console.error.bind(console));
I can see from the debugger that it's trying to find http://localhost/Default/app/boot - the "Default" part being the name of my controller (the same problem that arose when I didn't include a slash in the direct JavaScript references). I've tried prefixing the "app/boot" with a slash ("/app/boot") and this sort of works: it will find boot.ts but not any of the dependencies, again, adding the controller name to the URL.
Does anyone have any suggestions or, at the very least, a reference of where I can find information about the System.import directive?
Thank.