Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I need to show some static html in my angular appilation.

For example popup with share buttons - I don't need server data there. So, normally, when you use MVC, you should create .cshtml view, map it to controller action and get this content by url route (http://example.com/ajax/share-popup).

Is it ok to create common .html files instead of .cshtml and access it like a physical file http://example.com/views/common/shared-popup.html ?

Thanks.

share|improve this question
    
if there is nothing sensitive in it, there should be no reason to have to use the extra overhead of server framework to deliver simple html templates –  charlietfl Jul 6 at 14:19
    
You can create template inside script tag not need to create a file (that's when you're using a router) or just render your html, make it hidden and show it up when needed. –  jcubic Jul 6 at 16:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.