C
C
Chikiro2014-04-09 21:52:41
Django
Chikiro, 2014-04-09 21:52:41

Angular.js as a widget and Django - is it real?

I have a multi-page Django site. One page uses Angular.js.
Since Angular is used here to create a kind of widget, and not a completely single-page application, I would like to make its template with "ng-" static and load the html file using AJAX after the page is loaded. And I really want to not mix Django templates with Angular templates.
Is it realistic to do this? Or is it ideologically wrong from the point of view of Angular.js?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey K, 2014-04-10
@mututunus

Why load it via ajax? You can simply include it in the template using include.

L
lega, 2014-04-10
@lega

Try Angular Light, I think it will suit you better.
Here are some binding options that you can apply, for example, for the 5th option, the template can be stored with code, or pulled from the server as a file or via ajax.
Or for options 3 and 4, you can manually insert the template where necessary and make the binding in one line.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question