javascript - How to define a shared directive in angularjs
淡淡烟草味
淡淡烟草味 2017-05-15 17:13:44
0
1
602

Now I have multiple unknown modules that need to share a directive, but I need to specify the module when defining. How should I define a common directive. You can define a global function to return a directive, but you don’t want to pollute the global environment. What should be the best way to do it?

淡淡烟草味
淡淡烟草味

reply all(1)
曾经蜡笔没有小新

Create a new module directly and define the directive in the module. Wherever you need this directive, can you just declare the dependency in the corresponding module?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template