Я новичок в Иони c. Я начал внедрять геозону ioni c, используя cordova-plugin-geofence Найдите мой файл app.components
import { Geofence } from '@ionic-native/geofence/ngx';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) nav: Nav;
rootPage: any = HomePage;
pages: Array<{title: string, component: any}>;
constructor(
public platform: Platform,
public statusBar: StatusBar,
public splashScreen: SplashScreen,
private geofence: Geofence
) {
this.initializeApp();
//this.addGeofence();
// initialize the plugin
geofence.initialize().then(
// resolved promise does not return a value
() => console.log('Geofence Plugin Ready'),
(err) => console.log(err)
)
// used for an example of ngFor and navigation
this.pages = [
{ title: 'Home', component: HomePage },
{ title: 'List', component: ListPage },
{ title: 'PromotionsList', component: PromotionsListPage }
];
}
Но если 'ioni c serve' может увидеть ошибку в bowser 'ОШИБКА TypeError: Object (...) не является функцией в Geofence. инициализировать «Пожалуйста, помогите мне решить эту проблему. Иони c версия: 5. 3. 0