I want to use AngularJS with Django however they both use {{ }}
as their template tags. Is there an easy way to change one of the two to use some other custom templating tag?
Javascript – AngularJS with Django – Conflicting template tags
angularjsdjangodjango-templatesjavascript
Related Topic
- Javascript – event.preventDefault() vs. return false
- Javascript – Storing Objects in HTML5 localStorage
- Css – the best way to conditionally apply a class
- Javascript – How does data binding work in AngularJS
- Html – How do search engines deal with AngularJS applications
- AngularJS: Service vs provider vs factory
Best Answer
For Angular 1.0 you should use the $interpolateProvider apis to configure the interpolation symbols: http://docs.angularjs.org/api/ng.$interpolateProvider.
Something like this should do the trick:
Keep in mind two things:
{{ }}
in their templates then your configuration will break them. (fix pending)While there is nothing we can do about the first issue, except for warning people, we do need to address the second issue.