Ionic Eddystone 'evothings is not defined'


#1

Hello,
I want ot usea a beacon or a Eddystone and for that i activate Eddystone in my beacon and follow this tutorial

this problem is that i get a ReferenceError: evothings is not defined like the others, any idea?

my code:

import { Component, ChangeDetectorRef } from ‘@angular/core’;
import { NavController, Platform } from ‘ionic-angular’;

@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {
beaconData: any;
evothings
constructor(public navCtrl: NavController, private platform:Platform, private change: ChangeDetectorRef) {

}

scan(){
this.platform.ready().then(() =>{
evothings.eddystone.startScan((data)=>{
console.log(‘datta’,data)
this.beaconData = data
},error => console.error());

})

}
}

thanks


#2

Yep, this is not defined before. Where should it come from?

(No, I won’t watch a YouTube video to get more context - you’ll have to provide that yourself)


#3

I created a file in the src foldr call ‘declarations.d.ts’

and inside

declare module ‘*’;
declare var evothings: any;


#4

is there any actual working method to use beacons in ionic (ibeacons or eddystone) ?

thanks