Last active
August 20, 2017 22:45
-
-
Save mattiaerre/e7de3295d9a16b8b69963997e09276d2 to your computer and use it in GitHub Desktop.
how to client side render an OpenComponents component using the Console (Developer Tools)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((oc, $) => { | |
// see: https://github.com/opentable/oc/wiki/Browser-client#ocbuild-options | |
const html = oc.build({ | |
baseUrl: 'http://localhost:3030', | |
name: 'pi-baltimore-special-offers-promo-banners', | |
version: '1.X.X', | |
parameters: { | |
banner: 'purple-pasta' | |
} | |
}); | |
$('body').append(html); | |
oc.renderUnloadedComponents(); | |
} | |
)(window.oc, window.jQuery); | |
// To allow mixed content in Google Chrome: | |
// https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=mixed%20content%20chrome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment