I am trying to connect asp.net mvc 4 app with angular 11. Asp.Net Has controllers which handles server side posts to communicate with backend services. So the front end including styles are take care by angular 11 app. Initially i had tried with Asp.net core with angular 11 it worked like a charm, however due to some architectural decisions its been decided to proceed with asp.net mvc C# with angular 11. I was able to do most of the stuff but facing an error now. Please advise how to fix this issue
"The selector "app-root" did not match any elements"
Code behind of the page loaded
Project Details Web Project framework -> .Net 4.6.2 System.Web.Mvc - > Version 5.2.7.0, Runtime version - v4.0.30319
Angular 11 app is placed inside {Asp.netproject folder}/bundles/AngularOutput -Screenshot as below
For time being hard coding all the file names required for loading angular project, which was build in release mode (ng build --prod)
Index Page in asp.net mvc _Layout.cshtml :
ControllerName/Index - View -> Index.cshtml (View of the page being loaded)
I have added all 3 to check if any one works
In angular app -> app.component.html (app-container)-> modified as per article
Container.component.html (app-container)