Skip to content
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

Asynchronous/dynamic loading of components? #335

Open
zeno opened this issue Jan 30, 2014 · 3 comments
Open

Asynchronous/dynamic loading of components? #335

zeno opened this issue Jan 30, 2014 · 3 comments

Comments

@zeno
Copy link

zeno commented Jan 30, 2014

Can an Aura component be loaded dynamically (like say the chat widget in Gmail as Addy explains in this video) ?

Or are all components loaded on app.start?

@sbellity
Copy link
Member

Yep that's actually the whole point ;)

You can even define multiple endpoints or 'sources' where components van be
loaded. Aura takes care of the asynchronous things automatically
On 30 Jan 2014 16:25, "Zeno Crivelli" [email protected] wrote:

Can an Aura component be loaded dynamically (like say the chat widget in
Gmail as Addy explains in this video https://vimeo.com/35924733#t=2m36s)
?

Or are all components loaded on app.start?

Reply to this email directly or view it on GitHubhttps://github.com//issues/335
.

@zeno
Copy link
Author

zeno commented Jan 30, 2014

Yeah, but is it really the case once the app is built for production? It looks like in the end all the components get concatenated/optimized in a single file (including those "component sources").

What would be the API method in Aura to download and "start" a component on demand? I see two methods in the docs: the first "markup" method won't work after the app has already started (injecting an element with the data-aura-component attribute), and the 2nd "manual" method seems to only take a list of components to be started on application start (passed to app.start). Am I missing something?

@sbellity
Copy link
Member

Actually you dont have to build your components into a single file for
production.
If you use requirejs, Aura will automatically fetch them at runtime...

On Thu, Jan 30, 2014 at 5:20 PM, Zeno Crivelli [email protected]:

Yeah, but is it really the case once the app is built for production? It
looks like in the end all the components get concatenated/optimized in a
single file (including those "component sources").

What would be the API method in Aura to download and "start" a component on
demand
? I see two methods in the docshttp://aurajs.com/getting-started/#starting-components:
the first "markup" method won't work after the app has already started
(injecting an element with the data-aura-component attribute), and the
2nd "manual" method seems to only take a list of components to be started
on application start (passed to app.start). Am I missing something?

Reply to this email directly or view it on GitHubhttps://github.com//issues/335#issuecomment-33703520
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants