Skip to content

Instantly share code, notes, and snippets.

@kimagure44
Last active January 18, 2019 18:21
Show Gist options
  • Save kimagure44/14c948613a26f0fcd345f997f90011a6 to your computer and use it in GitHub Desktop.
Save kimagure44/14c948613a26f0fcd345f997f90011a6 to your computer and use it in GitHub Desktop.
binding-app
<link rel="import" href="../../bower_components/polymer/polymer-element.html">
<link rel="import" href="../../bower_components/paper-input/paper-input.html">
<dom-module id="binding-app">
<template>
<style>
:host {
display: block;
}
</style>
<!-- Binding 1 dirección Padre a hijo -->
<h2>Tu profesión es.... [[profesion]]</h2>
<!-- Binding 2 direciones -->
<paper-input label='Profesion 2 Way' value='{{profesion}}'></paper-input>
<!-- Binding 1 direción -->
<paper-input label='Profesion 1 Way' value='[[profesion]]'></paper-input>
</template>
<script>
/**
* @customElement
* @polymer
*/
class BindingApp extends Polymer.Element {
static get is() { return 'binding-app'; }
static get properties() {
return {
profesion: {
type: String,
value: ''
}
};
}
}
window.customElements.define(BindingApp.is, BindingApp);
</script>
</dom-module>
@bettyliew87
Copy link

hyiuhyu

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