Situation :
I've already created standalone AngularJS application which needs some back-end support (DB Acess, Ajax requests, Files upload support). I don't want to modify my app structure to fit razor .cshtml files requirements, and moreover I don't need razor engine support at all.
Whats the problem? :
What I need to achieve is to simply render my AngularJS application main page and force MVC to return regular HTML+JS+CSS app structure.
I've already tried to render main page of app by calling
public ActionResult Index()
{
return File(Server.MapPath("/AngularApp/") + "site_template.html", "text/html");
}
in my only one, simple controller, but only plain HTML has been loaded, obviously with no JS scripts or CSS files.
I'm not familiar with .NET MVC framework, however I belive that such simple task can be achieved without using dedicated template engine, since all the communication between .NET server and front-end application will be handled asynchronously.
How should it work? :
MainPageController.cs should load fully-operational AngularJS app by rendering it's main page - site_template.html, which will obviously load various .html files, JS scripts, CSS files etc.
I'll be grateful for any working solution.
site_template.html
tosite_template.cshtml
and serve up the view directly from the controller?