Created
November 13, 2014 23:17
-
-
Save cayblood/23ad52e02c1991f82d29 to your computer and use it in GitHub Desktop.
how to pass object attributes to a custom element
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
<!-- 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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you checked this ........ this approach is not working...