问题
Is it possible to have two different directives on the same HTML element?
<div directiveone directivetwo></div>
or will that cause scope issues?
回答1:
Yes you can and it's fairly common. The only potential issue with scope is you can't have multiple new scopes on the same element. Per the angular docs: "If multiple directives on the same element request a new scope, only one new scope is created." http://docs.angularjs.org/guide/directive
来源:https://stackoverflow.com/questions/19352649/is-it-possible-to-have-multiple-directives-on-the-same-html-element