0
服務器返回代碼html,我會在頁面中插入此代碼。但如果我插入jQuery,角度指令不起作用。 我的代碼到控制器:如何將Html代碼從服務器插入到Angular中?
$scope.submit = function() {
$http({
method: 'POST',
url: 'find.php',
data:{url:$scope.url}
}).then(function successCallback(response) {
$("#center").remove();
var data=response.data;
$("#result").html(data);
}, function errorCallback(response) {
$("#center").remove();
$("#result").html("ERRORE");
});
}
這個例子是在Jquery的。如何在Angular?
http://stackoverflow.com/questions/19845950/angularjs-how-to-dynamically-add-html-and-bind-to-controller – akgaur