Noam Noam - 5 months ago 12
HTML Question

Change AngularJS opening and closing tags

I'm trying to change angular opening and closing tags, (for python django jinja, if that matter)
So for example, instead of this

<div ng-app="">
<span>name - type: <input type="text" ng-model="name" /></span>
<span>name - output: {{name}}</span>
</div>


I'll have this

<div ng-app="">
<span>name - type: <input type="text" ng-model="name" /></span>
<span>name - output: [[name]]</span>
</div>


And i've already tried this:

https://docs.angularjs.org/api/ng/provider/$interpolateProvider

and it's doesn't works at all.. I'm also tried to replace each "{{" in the angularjs.js file, with "[[", (and "}}" with "]]") and it's still doesn't makes any change..
And yes, i saw that it's not recommended to do something like this, (because security reasons) but i'm still need that..
And i'm also need that in AngularJS, and not in python.. (to replace the symbols in angular, not in python)

How can I do that?

Answer

So it has to be something like this:

angular.module('YourAppName', [], function ($interpolateProvider) {
     $interpolateProvider.startSymbol('[[');
     $interpolateProvider.endSymbol(']]');     
});