I'm encountering an issue with $sce while using AngularJS 1.6.4:
Error: [$sce:itype] http://errors.angularjs.org/1.6.4/$sce/itype?p0=html Stack trace : L/<@https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:6:425 trustAs@https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:155:46 [...]
Main Controller Error
(function(angular) {
'use strict';
angular.module('fooModule')
.controller('MainCtrl', ['$scope', '$q', '$http', '$sce', function ($scope, $q, $http, $sce){
...
$q.all([
...
]).then(function(responses) {
$scope.send = function(){
var data = {
...
};
$http({
url: 'file.php',
method: "POST",
data: $.param(data),
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}).then(function successCallback(response) {
$scope.dataResponse = $sce.trustAsHtml(response);
}, function errorCallback(response) {
console.dir(response);
});
}
};
});
...
}]);
})(window.angular);
I'm puzzled by the meaning of this error. Can anyone clarify it for me? And how can I resolve it?