Directory

← Back

sc-data-binding-helpers

Polymer 2.x mixin that provides some useful methods for data bindings.

Author

Contributors

Rating

[ This description is mirrored from README.md at github.com/SupportClass/sc-data-binding-helpers on 2019-05-10 ]

Polymer.SCDataBindingHelpers Published on webcomponents.org Build Status

A Polymer 2.x mixin that provides some useful methods for data bindings. See the listing on webcomponents.org for full documentation (You'll need to click on "Show N protected methods" to see them).

Example

<dom-module id="my-element">
    <template>
        <style>
            :host {
                display: block;
            }
        </style>
        
        <template is="dom-if" if="[[_isTruthy(foo)]]">
            foo is: truthy
        </template>
        
        <template is="dom-if" if="[[_isFalsey(foo)]]">
            foo is: falsey
        </template>
    </template>
    
    <script>
        /**
         * @customElement
         * @polymer
         * @appliesMixin Polymer.SCDataBindingHelpers
         */
        class MyElement extends Polymer.SCDataBindingHelpers(Polymer.Element) {
            static get is() { 
                return 'my-element';
            }
            
            static get properties() { 
                return {
                    foo: {
                        type: String,
                        value: 'foo'
                    }
                };
            }
        }
        
        customElements.define(MyElement.is, MyElement);
    </script>
</dom-module>

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Dependencies

  • polymer#Polymer/polymer#^2.0.2
Released
2018-12-07
Maturity
IMPORTED
License
MIT License

Compatibility

Framework
Polymer 2.0+
Browser
Browser Independent

sc-data-binding-helpers - Vaadin Add-on Directory

Polymer 2.x mixin that provides some useful methods for data bindings. sc-data-binding-helpers - Vaadin Add-on Directory
**[ This description is mirrored from README.md at [github.com/SupportClass/sc-data-binding-helpers](https://github.com//SupportClass/sc-data-binding-helpers/blob/v2.0.0/README.md) on 2019-05-10 ]** # Polymer.SCDataBindingHelpers [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/SupportClass/sc-data-binding-helpers) [![Build Status](https://travis-ci.org/SupportClass/sc-data-binding-helpers.svg?branch=master)](https://travis-ci.org/SupportClass/sc-data-binding-helpers) A Polymer 2.x mixin that provides some useful methods for data bindings. See the [listing on webcomponents.org](https://www.webcomponents.org/element/SupportClass/sc-data-binding-helpers/mixins/Polymer.SCDataBindingHelpers) for full documentation (You'll need to click on "Show N protected methods" to see them). ## Example ```html ```
Online