IBeacon PlugIn error

i am building an App using the IBeacon PlugIn. But when i’m trying to use it in my code I get an error : 'cordova is not defined ’ . I have checked the ‘cordova.js’ file and is not missing.
Here is a sample of code, for example when i type let delegate = IBeacon.Delegate(); i get the error.

 import { Component } from '@angular/core';
import { IBeacon } from 'ionic-native';
  selector: 'page-home',
  templateUrl: 'home.html'

export class HomePage {
  items = Beacons;
let delegate = IBeacon.Delegate();

You cannot test it on browser.

Same here. i got the same error and i have couldn’t resolve it.

Please help.

I have it working and I posted my code. Hope it helps you.

Thanks. Your code was very helpful to me. But when i try copying the code in to my project and run on android mi code does not request for authorization and i have to give permission to the app manually. How can i solve this?.

the link provided by you is down!