Skip to content Skip to sidebar Skip to footer

Angularjs Not Working With Flask

I have this simple app:

Solution 1:

To achieve your expected result, use below option to bind your scope value

{a message a} Start tag and end tag should be '{a' and 'a}' respectively without {{}} inside them

HTML:

<htmllang="en"><head><metacharset="utf-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><title>working app</title><scripttype="text/javascript"></script></head><bodyng-app="myApp"><h1>Hello!</h1><divng-controller="myCtrl"><span>{a message a}</span></div></body>

JS:

angular.module('myApp', [])
            .controller('myCtrl', ['$scope', function($scope) {
                $scope.message = "Howdy!!";
            }])
            .config(['$interpolateProvider', function($interpolateProvider) {
                    $interpolateProvider.startSymbol('{a');
                    $interpolateProvider.endSymbol('a}');
            }]);

Codepen= http://codepen.io/nagasai/pen/JKrVgV

Post a Comment for "Angularjs Not Working With Flask"