我在我的项目中添加了 Cordova-plugin-local-notification(https://github.com/katzer/cordova-plugin-local-notifications)。我将此代码添加到项目中
cordova.plugins.notification.local.schedule({
title: 'My first notification',
text: 'Thats pretty easy...',
foreground: true
});
但它显示一个错误:
cordova is not defined
at new MyApp
我该如何解决这个问题?请帮忙
需要,像这样声明科尔多瓦,
declare var cordova: any;
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句