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

[ 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>

Install

Link to this version
ImportedReleased 07 December 2018MIT License
Framework Support
Polymer 2.0+
Browser Independent
Install with
bower install --save SupportClass/sc-data-binding-helpers"#2.0.0"
Run the above Bower command in your project folder. If you have any issues installing, please contact the author.
Release notes - Version 2.0.0

Dependencies

  • polymer#Polymer/polymer#^2.0.2