aurelia-ui-toolkits / aurelia-after-attached-plugin

MIT License
4 stars 1 forks source link

afterAttached() is not called in custom element #1

Closed MT-PL-SWF-Dev closed 7 years ago

MT-PL-SWF-Dev commented 7 years ago

When I try to use this plugin for custom element it is not called.

JS: export class MyElement { attached(){ console.log("Called"); } afterAttached(){ console.log("Not called"); } }

HTML: <my-element></my-element>

JeroenVinke commented 7 years ago

Hey @MT-PL-SWF-Dev,

This should be fixed now. Let me know if this is not the case

MT-PL-SWF-Dev commented 7 years ago

Seems to work, thank you! The only thing I have noticed for now is that with custom element with noView decorator doesn't raise this event. I understand it's kind of expected in some way, because you are using View prototype. Still attached is run on noView elements

JeroenVinke commented 7 years ago

@MT-PL-SWF-Dev should be good now

MT-PL-SWF-Dev commented 7 years ago

Sorry for long time without anwser, I was on vacation :) @JeroenVinke Awesome job, it works like charm! Thank you :)

JeroenVinke commented 7 years ago

Excellent :+1: thanks for the update