1

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

For example popup with share buttons - I don't need server data there. So, normally, when you use MVC, you should create a .cshtml view, map it to a 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.

2
  • 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 Commented Jul 6, 2014 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. Commented Jul 6, 2014 at 16:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.