Open kkampardi opened 7 years ago
Here are some notes on a possible implementation for Django and AngularJS working together:
@otsakir this is related to the front end:
{% verbatim %}
to encapsulate the Angular expressions within the template so that Django won't attempt to render them.Example: `{% verbatim %}
{{ post.body }}
{% endverbatim %}`
To specify Angular controllers and attributes use Django {% block 'attribute' %}
tag, like this:
<div class="content" ng-controller="{% block ng_controller %}AppController{% endblock %}">
If we are, for some reason, to use more than one templates for this application we can enclose the {% verbatim %}
within the classic Django {% block content %} ... {% endblock %}
tag. We're able to route to those temples using both Angular routing or Django URL resolvers.
@otsakir There is a bunch of different solutions regarding Django and Angular integration, that we can checkout. As far as I can see the above seems to be enough simple and clean.