Closed martonbrunner closed 4 years ago
Hi! Thanks a lot for the PR! The fix looks good. Unfortunately I'm away from my desk right now for the weekend, so probably won't be able to merge/publish until Monday, but I'll take a look then.
@martonbrunner This was published in version 3.2.1.
@noppa That is great. Thank you for the quick resolution.
Hi,
First of all thanks for all your work, this tool is amazing.
I have one issue though regarding directives. More specifically in cases where the directive is defined with an ES6 class. Something similar to the example here: https://www.michaelbromley.co.uk/blog/exploring-es6-classes-in-angularjs-1.x/#directives
When defining a directive this way the
compile
andlink
functions will be properties on the prototype of the directive object rather than its own properties. In the case ofcompile
I don't think it is problematic as you are copying it to a new property here. But in the case of thelink
function, it will be lost as the result object will not have the prototype of the original directive. I suggest a small change to copy the prototype of the original directive to the new one too. This way thelink
will be available on the result directive too.In my case, the suggested change resolved the issue and I don't think it should cause any problems elsewhere. I hope you can accept this change or improve it to solve my issue.
Thanks!