在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); };