I don’t have a blog post yet, but I do have some example open source code that is working in the wild (couple css rough spots at the moment, but hopefully sorted out soon).
The ember-cli based Ember app is here:
The README is a decent preview of how things are wired together. It takes advantage of two key addons:
https://github.com/walter/ember-cli-make-concoction # this is what allows the jQuery widget loader to create unique instances of the address-widget Ember app
https://github.com/walter/ember-cli-meta-options # allows for passing settings to an Ember app, in my case the jQuery loader handles putting the settings in place as meta tags
Here is jQuery loader itself:
https://github.com/opengovernment/askthem/blob/master/public/widgets/address/widget.js # check the README in the same directory for prep details
Finally the embedded code looks like this:
<script class="at-widget-loader" src="http://www.askthem.io/widgets/address/widget.js" data-headline="Ask your elected officials a question" type="text/javascript" async></script>
or a more elaborate example:
<script class="at-widget-loader" src="http://www.askthem.io/widgets/address/widget.js" data-tag-id="at-zip-example" type="text/javascript" async></script>
<div style="display: none;" data-tag-id="at-zip-example" class="at-widget-attributes"> <div class="headline">Custom Headline</div> <div class="question-summary">Custom Summary with <b>HTML!</b></div> <div class="question-body">custom body</div> </div>
There is a fair bit you need to do with getting CORS in place to allow this stuff to work as well. I found this helpful:
http://benjaminhorn.io/code/setting-cors-cross-origin-resource-sharing-on-apache-with-correct-response-headers-allowing-everything-through/
You also need to go through your config/environment.js CORS stuff and add all the sources of your images, fonts, scripts, etc.
That will have to do for now. Feel free to ask questions here.