-2

The error message

the html page I am trying  to render

the flask app that returns the page

I tried another example with ng-bind. Thats works fine. Is there anything I need to add to get this working? Thanks in advance.

davidism
  • 121,510
  • 29
  • 395
  • 339
python dev
  • 219
  • 1
  • 2
  • 9

1 Answers1

1

Jinja and Angular both share the use of {{ and }} tags to indicate accessing their variables, so you need to either tell Jinja or Angular to use something else, so they don't collide. Below is how to tell Angular how to use a different tag to indicate a variable call:

var app = angular.module('myApp', []);

app.config(['$interpolateProvider', function($interpolateProvider) {
  $interpolateProvider.startSymbol('{[');
  $interpolateProvider.endSymbol(']}');
}]);

(Taken from Loren Howard's guide)

Doobeh
  • 9,280
  • 39
  • 32
  • thank you! But, this config is bound to ng-app="myApp". Is there a way I can get this config working across all the pages/ng-apps in my application? – python dev Oct 11 '15 at 16:10