-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<compose> content not loaded in DOM when calling from Attached method. #646
Comments
As far as I'm familiar with the |
Hello, I understand what you are trying to say regarding the composition, but I have to put in my 2cents. It's not the |
The Its purpose is to dynamically compose a There is the |
I think #633 and this are not related in any way. There are two
|
I'm submitting a bug report
au -v 0.35.1
Please tell us about your environment:
Operating System:
Linux (ubuntu) but also under Win10
Node Version:
v10.10.0
6.4.1
Browser:
all
Language:
ESNext
Current behavior:
Compose content is not ready in DOM for 'attached' method.
It looks like the attached method is called before the composition is done.
If you are using compose as includes only (without view-model) you are not able to get the part of the
<compose>
DOM.Expected/desired behavior:
Working example:
https://gist.run/?id=22855ce9b7864f8891a150b8a645b0db
In console you will see
<p>
element.Now we have to downgrade the aurelia-templating to version 1.7.0 which works well. (and also related parts)
How to reproduce:
Install new aurelia project: au new
Keep everything in default.
Once the project is ready, create view template - comp.html:
Use compose element and include the created view to app.html:
Next create the attached method and try to get the element from comp.html
au run
and watch the console. You'll seenull
. :(What is the expected behavior?
According your documentation:
attached() - the component is attached to the DOM (in document). If the view-model has an attached callback, it will be invoked at this time.
What is the motivation / use case for changing the behavior?
We are using compose elements as includes and for 3rd party plugins which needs the DOM to be loaded/ready before they work. Now the DOM is not ready when calling it from attached method so the app crashes.
I appreciate any help. ✌️
Thank you very much!
The text was updated successfully, but these errors were encountered: