0

我正在尝试从窗口事件触发 AngularJS 控制器功能。但是,函数内部的 $http() 不会执行。它只是停止。

window.addEventListener("message", function(msg) {

    // this works!!
    alert(angular.element(document.getElementById('ListFindRooms')).scope().var);

    // this kinda works, but Angular $http() inside the funciton is not executed
    angular.element(document.getElementById('ListFindRooms')).scope().function();
}

}); 
4

0 回答 0