[Fixed]-Django passing Polish characters to Angular in init causes lexer error

1👍

You need to put the value in quotes.

<div ng-init="supervisor='{{supervision.supervisor}}'">

0👍

Here’s what I ended up doing:

I’ve added a function to the controller scope:

$scope.initialize = function(data){
    $scope.supervisor = data;
};

and then I did this in my html template:

ng-init="initialize( '{{supervision.supervisor}}');

And now it works. Hope it help you if you have the same problem!

Leave a comment