I have integrated an Angular 6 application into an existing .NET MVC 5 application. A fallback route was set up in the MVC app (RouteConfig.cs) to direct "unknown" routes to the Angular app's router module (app.routes.ts). However, it seems that the routes defined in the Angular app are not working as expected, and the associated components are not loading.
The development environment includes Visual Studio 2017 Enterprise 15.6.7, a standard .NET Web application for MVC 5.2.3.0 (not .NET Core), Node.js 8.11.3, npm 6.3.0, Typescript 2.9.2, Angular CLI 6.0.8, Angular 6.0.3, bootstrap 3.3.7, jquery 3.3.1, and runs on Windows 10 x64 OS.
Below is the RouteConfig.cs file for the MVC app with the catch-all route at the bottom:
[c# code will be here]
Upon creating the Angular app using CLI, the package.json entry for Typescript defaults to version 2.7.2. The dependencies listed include various Angular modules along with other necessary libraries.
The app.routes.ts file defines simple routing for the application. It includes paths for displaying EventsListComponent and EventDetailsComponent.
[typescript code will be here]
In the EventsAppModule, AppRoutingModule is imported to enable routing functionality. However, when trying to use routing in the main component/page of the app, EventsListComponent does not load properly. Alternatively, using a different tag
Furthermore, accessing specific routes like http://localhost:39420/events or http://localhost:39420/events/1 results in blank pages being rendered instead of the expected content.