-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
How to add nested components to an instance in run-time #926
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
Comments
This is not currently directly supported - There is an issue for it, #640 One workaround would be to manually instantiate the new child component, with a |
Interesting workaround! The only downside is to find a way to link the parent data with the new child component. |
I will close it in favor of #640 |
sync svelte docs Co-authored-by: Rich-Harris <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Instead of defining nested components in conding-time:
Is it possible to add a new component to the
components
object in run-time? I'm getting the code of the new component via ajax, and this component was already compiled by Svelte with'eval'
format.The problem is visibility
I'm am unable to access the
components
object using the variable of my main app, to add new components loaded in run-time.For example, a
console.log( app.components )
from a compiled and runningapp
returnsundefined
:The text was updated successfully, but these errors were encountered: