Is it possible to return '*.htm' files from the ASP.Net MVC4 Web API application?
I am trying to use AngularJs to manage the client side views and when I include the following commend on my page:
<div ng-controller="application.RootController">
<div ng-switch="subview" >
<div ng-switch-when="home" ng-include="'../Views/Angular/customer/overview.htm'"></div>
<div ng-switch-when="admin" ng-include="'../Views/Angular/Admin/home.htm'"></div>
</div>
</div>
I see that this is working as expected on the browser, but the ASP.Net is returning 404 page not found.
Also I am unable to physically browse any of the htm pages, so is there a special thing i need to do in ASP.Net MVC in terms of configuring the routing to return out the htm pages?
Files in the ~/Views
folder are not served directly. You should place your HTM pages somewhere else. For example you could have an ~/Angular
folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With