|
|
|
|
|
by monkeyfacebag
4797 days ago
|
|
I don't know if it's possible but, in general, it's not a good idea to mix server-side and client-side templating. The Angular guys discuss this in one of the videos on the Angular channel (I found it for you here: http://www.youtube.com/watch?feature=player_detailpage&v...). The two reasons seem to be first, it's not clean and second, it's easy to introduce security issues. If I want to have a page that has both server-side templating and client-side templating, I push the ng-app directive down into the DOM and assert that Angular has "ownership" of that portion of the page. I can't remember what Django's templating engine supports, but in Jinja2, you can create a {% raw %} {% endraw %} block that tells Jinja2 not to parse any delimiters in the block (I'm sure Django has something like this, I just can't recall what it is). This makes it pretty easy to separate out Angular's purview from the server's purview even on a single page. |
|