我们有一段代码,想操纵已有的元素。
它看起来像这样:
[this.box] = angular.element('#pop-box-' + this.$scope.$id);
this.box.css({...});
调试此,盒子被正确发现,这是正确的元素。但是,我得到一个错误,css
不是一个函数。基于该文档https://docs.angularjs.org/api/ng/function/angular.element,元素应该有一个可用。
在我们的例子中,jQuery是也在项目。
我在想什么?
环绕你元素$()
$(this.box).css({...});