我已經發出POST請求來獲取塊的html。這是帖子:角度指令在POST後消失
$scope.changeMenu = function() {
$http({method: "POST", url: "/menu"}).then(function (response) {
$scope.selected_menu_item = response.data;
},
function() {
$scope.selected_menu_item = response.data;
});
}
塊,我在那裏顯示接收到的HTML ::
<div ng-bind-html="selected_menu_item" class="chosen-item">
比我得到的迴應: enter image description here
但角度指令已經消失HTML文檔中: enter image description here
在POST之後我需要做些什麼來獲取角度指令?
感謝
您不能在通過'ng-bind-html'插入的HTML內部使用角度指令/綁定。 – Claies