Angular: Ajax request

0

Should not the code be working? I already tried the console and the text in the test file is coming normally, it just does not appear when I call with //demo.msg// .

Where am I going wrong?

SCRIPT

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

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

app.controller('DemoController', function($scope, $http){
    $http.get("/teste").then(function(response){
        $scope.msg = response.data;
    });
});

HTML

<div ng-app="app" ng-controller="DemoController as demo">
    //demo.msg//
</div>
    
asked by anonymous 14.01.2018 / 19:28

0 answers