I am user iron-list with iron-ajax but after ajax response when pushing element to iron-list giving null exception = "Cannot read property '_list' of undefined"
<script>
Polymer({
is: 'my-home',
ready: function () {
this.$._ajax.generateRequest();
},
onResponse: function (e) {
var people = e.detail.response.data;
people.forEach(function (person) {
this.$._list.push('items', person);
});
// Clear the lower threshold so we can load more data when the user scrolls down again.
this._scrollTheshold.clearTriggers();
}
});
</script>
here is my html code of iron-list
<iron-list id="_list" items="[[data.data]]" as="item">
<template>
<div style="margin-top: 0px">
<!--Card with header image http://placehold.it/350x150/FFC107/000000-->
<paper-card>
<div class="card-content">
<h1 class="feed_title">[[item.heading]]</h1>
<p class="feed_description">[[item.subheading]]</p>
</div>
<div class="card-actions">
<paper-button class="button-blue">
Share
</paper-button>
<paper-button class="button-blue">
Explore
</paper-button>
</div>
</paper-card>
</div>
</template>
</iron-list>