Answer the question
In order to leave comments, you need to log in
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
Why load it via ajax? You can simply include it in the template using include.
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 questionAsk a Question
731 491 924 answers to any question