Is there a way to get the raw DOM element from an angular.element

孤街醉人 提交于 2019-12-03 06:11:29

问题


angular.element

All element references in Angular are always wrapped with jQuery or jqLite; they are never raw DOM references.

How can I get the raw DOM element, because I have legacy JS code (jscolor Picker) that needs the raw DOM element?


回答1:


Found it:

ang_element = angular.element(element);
raw_element = ang_element[0];


来源:https://stackoverflow.com/questions/18302493/is-there-a-way-to-get-the-raw-dom-element-from-an-angular-element

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!