Skip to content

Instantly share code, notes, and snippets.

@cayblood
Created November 13, 2014 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cayblood/23ad52e02c1991f82d29 to your computer and use it in GitHub Desktop.
Save cayblood/23ad52e02c1991f82d29 to your computer and use it in GitHub Desktop.
how to pass object attributes to a custom element
<!-- 1st method: trying to pass attribute as JSON -->
<my-element options='{"name": "Joe Blow"}'></my-element>
<!-- 2nd method: trying to pass a global object -->
<script>
window.obj = {name: "Joe Blow"};
</script>
<my-element options="{{window.obj}}"></my-element>
@saeed3e
Copy link

saeed3e commented Dec 19, 2016

Have you checked this ........ this approach is not working...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment