I've been struggling with the way to implement a good structure for directives in TypeScript. I've found couple of solutions online, however to be honest, I have no idea which one to use - they all do their job.
What is a good structure for a directive to stick to?
nb I'm using AngularJS 1.
In my opininion, thinking on Typescript Way, you need to import the AngularJS definition , this gives you references on the framework.
In ddo use the APIs as you wish
[...] export function tsDirective(): ng.IDirective [...]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.