Barcode implemetation

im developing an app I want the user to be able to scan a barcode from a food product and from that barcode I would like it to display all of the food allergens within that product.

How would I go about this?

thank you

You would simply add the barcodescanner plugin to your cordova project:

ionic plugin add phonegap-plugin-barcodescanner

Documentation on how to use it in your app is here:

Sample JS code:

  function (result) {
      alert("We got a barcode\n" +
            "Result: " + result.text + "\n" +
            "Format: " + result.format + "\n" +
            "Cancelled: " + result.cancelled);
  function (error) {
      alert("Scanning failed: " + error);


…where do you find the list of food allergens for products?

I want to store the data into firebase so it will post the information once the user has scanned. how would i go about this?

I will be using a website ive found that lists all the products for allergens