angular.js - angular中dom操作放controller还是directive里?
过去多啦不再A梦
过去多啦不再A梦 2017-05-15 16:50:45
0
2
793

angular中dom操作放controller还是directive里?

过去多啦不再A梦
过去多啦不再A梦

reply all(2)
PHPzhong

Put it in the directive.

The controller must not be able to operate the dom. The controller is the data on the operation page.

巴扎黑

Directive is required to operate DOM. For relevant angular writing specifications, please refer to:
https://github.com/johnpapa/angular-styleguide#manipulate-dom-in-a-directive

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!