angular.js - angularjs中怎么获取自定标签里面class里面的css属性
黄舟
黄舟 2017-05-15 16:56:49
0
2
556

angularjs中怎么获取自定标签里面class里面的css属性

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
迷茫

Two choices, one is

 document.getElementsBy

Id("your_id");
Then peel the garlic, of course getElementsByClassName belongs to the same solution as this.

The second one, if it is in the directive, it is also possible

angular.element(this)

Then peel the garlic...

Ty80

This is not possible. I found a way. You can have a scope in the custom tag. Use $rootScope to get the attributes and then share them, so that they can be used outside the custom tag.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!