![](/img/trans.png)
[英]What's the best way to fix two AngularJS directives with the same name?
[英]What's the best way to write directives?
我一直在努力为TypeScript中的指令实现良好的结构。 我在网上找到了几种解决方案,但是老实说,我不知道该使用哪种解决方案-它们都在工作。
指令要遵循的良好结构是什么?
nb我正在使用AngularJS 1。
在我看来,考虑Typescript Way,您需要导入AngularJS定义 ,这为您提供了有关框架的参考。
在ddo中按需使用API
[...]导出函数tsDirective(): ng.IDirective [...]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.