glimmerjs/glimmer-website

Documentation for running multiple apps on the same page

Closed this issue · 2 comments

I was able to eventually run multiple apps on the same page, which is key for larger companies with different teams working on different services. However, I couldn't find documentation on how to implement this, as it's a little different than changing the rootElement in an Ember app.

I'm not sure if this is a possible intended use for Glimmer Apps, but it seems like it should be to me.

@atrama: For those of us that landed here trying to find something for exactly that -- care to post the workaround?

From what I've found, you'll need to update your src/index.ts to change containerElement from app to my-new-element-id. Then change <div id="app"></div> in src/ui/index.html to <div id="my-new-element-id"></div>. From there, you can add other app divs in your host page as well as their respective scripts.

I'll submit a PR with specific instructions soon.