All the resources use only HTML, but stuff like Cordova and Ionic work on the client, with HTML pages (and JavaScript and CSS of course), and once MVC has served a page, that page is HTML, so the hybrid tooling should be able to use it.
The only problem is that once it's served, it lacks the .html
extension, but maybe I can figure a way to add this.
The reason I'd like to stick to .cshtml
for my layout is that I can scaffold views from my sever-side view models, and this adds quite a lot of value for me.
If the question is: can you have .cshtml
files on your mobile device, the answer is no. .cshtml
file is processed on server by the Razor view machine, so plain HTML
can be generated. Obviously you don't have MVC, Razor and such on your hybrid ionic app.
You can however work around it by taking your angular templates to be generated on your server by MVC. So, when you setup your templateUrl
somewhere, instead of taking the relative path to your local template .html
file, you can point to the controller on your server, giving the full path, with http://
and so. The controller will then generate your template for you and return as plain HTML.
Bear in mind, that angular will cache this, so it will be loaded only once.