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:
or a more elaborate example:
<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:
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.