title: How to bind polymer template dom-repeat using promise object?
body: <p>i trying to bind dropdown values using function inside this making call to firestore then i am returning value using promise </p>
  
  <p>HTML</p>
  
  <pre><code>&lt;template is="dom-repeat" items="{{_modOptsArry(item.modKey)}}" as="opt"&gt;
       &lt;paper-item value="{{opt.$key}}"&gt;{{opt.obj.val}}&lt;/paper-item&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>JavaScript</p>
  
  <pre><code>_modOptsArry(modeKey) { 
      let opts = [];
      var promise = new Promise((resolve, reject) =&gt; {
          firebase.firestore().collection("record").doc("s1").collection("class").orderBy('o').onSnapshot(function (querySnapshot) {
              // let opts = [];
              querySnapshot.forEach(function (doc) { 
                  var model = doc.data(); 
                  opts.push({ $key: doc.id, obj: { val: model.nm } });
              });
              resolve(opts); 
          })
      })
      promise.then(function (result) {
          return Promise.resolve(result); // Here i am returning array but in the dom-repeat it not binding values because it is returning Promise Object My Array is there inside this Promise object. how to resolve this problem..
      }); 
  }
  </code></pre>