Mar 25, 2013 at 6:03 PM
Edited Mar 25, 2013 at 6:39 PM
I create apps where only static files is hosted on my own site (and I'm using other services, dropbox, azure mobile services et c for data).
However when an app becomes big enough it would be nice to be able to separate the markup in different files, for example different client side views or components, and the markup from the server point of view is still static. The dynamic parts comes to play
at client side (mvvm).
Also - instead of repeating the same markup again and again (for example for bootstrap controls) I use Razor helpers.
I use dynamically loaded templates but that requires multiple server calls plus I really like the Razor syntax to build my markup.
Here's an idea of what I like to write in my spa razor files:
<script type="sometemplating" id="templateOne">
<script type="sometemplating" id="templateTwo">
Hope it makes sense.
(I can achieve what I want by rendering my main razor in the browser and save the rendered markup.)