#angular #cordova #plugins #cordova-plugins
Вопрос:
компонент , в котором я вызываю cordova, для доступа к плагину, но получаю ошибку, я уже добавил cordova в index .html
import { Component, OnInit } from '@angular/core';
import { ConstantFactory } from '../shared/constants';
declare var cordova: any;
@Component({
selector: 'app-landing-page',
templateUrl: './landing-page.component.html',
styleUrls: ['./landing-page.component.scss']
})
export class LandingPageComponent implements OnInit {
title
constructor(private c: ConstantFactory) { }
ngOnInit(): void {
this.title = this.c.TITLE
this.testPlugin()
}
testPlugin() {
cordova.plugins.LogicLinkPlugin.coolMethod("coolMethod", function (response) {
console.log(response);
}, function (error) {
console.log(error);
});
}
}