0

I have an angular app deployed on Google App Engine (python).

Whenever I try to access controller variables on View using {{}} notation, nothing happens.

Controller

$scope.abc ="ABC"

On view

<h2>{{abc}}</h2>

This works if I run my app on local without app engine. but after deployment same code does not work.

I have googled this but didn't get anything. What is the issue with {{}} ?

konqi
  • 5,137
  • 3
  • 34
  • 52
Sunil Garg
  • 14,608
  • 25
  • 132
  • 189

2 Answers2

2

You must replace the {{}} tag

because the python django use it also var myApp = angular.module('DemoProject', []);

    myApp.config(function($interpolateProvider) {
        $interpolateProvider.startSymbol('{$');
        $interpolateProvider.endSymbol('$}');
        });
    myApp.run(function ($rootScope) {

    });

use it {$ $} will work

Joseph M Tsai
  • 568
  • 3
  • 12
1

There is conflict with {{}} expression of angular and python/webapp. So I used $interpolateProvider to change the {{}} with ////

app.config(function ($interpolateProvider) {
    $interpolateProvider.startSymbol('//');
    $interpolateProvider.endSymbol('//');
});

Here is one more post related with this

AngularJS with Django - Conflicting template tags

Community
  • 1
  • 1
Sunil Garg
  • 14,608
  • 25
  • 132
  • 189