I'm using AngularJS 2 in a ASP.NET MVC 5 project, I do not use the routing provided by Angular and rely only on the MVC routing strategy.
Strangely, AngularJS seems to look at the URL and only load correctly when I'm on a route "domain/Controller", if I'm on a route as "domain/Controller/" or "domain/Controller/Action" my Angular app is not loading and I have the following error in the browser:
I'm using the following script to load my bootstrapper:
<script src="~/Scripts/systemjs.config.js"></script>
<script>
System.import('../tsScripts/boot').catch(function (err) {
console.error(err);
});
</script>
my boot.ts file:
///<reference path="./../typings/globals/core-js/index.d.ts"/>
import {bootstrap} from '@angular/platform-browser-dynamic';
import {HTTP_PROVIDERS} from '@angular/http';
import {AppComponent} from './app';
bootstrap(AppComponent, [HTTP_PROVIDERS]);
I have no idea why Angular (or another part coming with the framework) is incompatible with the MVC routing, or what is wrong with my implementation.
