Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Updating template when model's child property changes not working #195

Open
binoculars opened this issue Oct 25, 2014 · 0 comments
Open

Comments

@binoculars
Copy link

Is there a better or proper way than to set template.model = template.model to trigger the observer?

Example

var template = document.querySelector('#mytemplate');
template.bindingDelegate = new PolymerExpressions();
template.model = {};

['child1', 'child2'].map(function(child) {
    document.querySelector('core-ajax.' + child).addEventListener("core-response",
        function (e) {
            template.model[child] = e.detail.response;
            template.model = template.model; // workaround for now.
        }
    );
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant