Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229600

I need to get products that matches id wit MenuId from firebase using ionic3

$
0
0

getProducts(id) {
this.productRef.once(‘value’, (snap) => {
this.products = [];
if (snap.val()) {
var tempProducts = snap.val();
for (var key in tempProducts) {
let singleProduct = {
id:key,
menuid: tempProducts[key].MenuId,
name: tempProducts[key].Name,
//images:tempProducts[key].Image,
price:tempProducts[key].Price,
//rating:tempProducts[key].rating,
//sale_price:tempProducts[key].sale_price,
description:tempProducts[key].Description,
image:tempProducts[key].Image
};

      this.products.push(singleProduct);
    }
  }
  this.events.publish('productsLoaded');
}


);

this is my actual code in .ts,
how i can get specific data from firebase ,
i need to get products that matches id wit MenuId,


Viewing all articles
Browse latest Browse all 229600

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>