在js函数中引用angular对象:

function AdapterEnable(){
  $('#AdapterBtn').attr("disabled", false);
  var appElement = document.querySelector('[ng-controller=myCtrl]');
  var scope = angular.element(appElement).scope();
  scope.m_startAdapter = false; 
}

 

angular模块中引用dom元素:

    $scope.RedOrdr = function(ptype, mt, oder) {       
        $("#redKey").val('');                
        setTimeout(
            function () {
                $("#redKey")[0].focus();
        }, 500);        
    };

 

相关文章:

  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2022-02-03
  • 2022-01-01
  • 2021-10-22
  • 2022-12-23
猜你喜欢
  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-02-11
  • 2022-01-13
相关资源
相似解决方案