typescript - 无法使用 ionic 3 原生日历插件
问题描述
我正在尝试在我的项目中使用离子日历插件,但我得到:Object(...) is not a function
每当我尝试显示日历时。
我的html代码是:
<div class="appoint-ser"><span (click)="opencal()">Select Appointment Date</span></div>
我的ts 代码是:
import { Calendar } from '@ionic-native/calendar/ngx';
constructor(
private calendar: Calendar,
) {
}
opencal(){
this.calendar.createCalendar('MyCalendar').then(
(msg) => { console.log(msg); },
(err) => { console.log(err); }
);
}
解决方案
推荐阅读
- bash - 删除 2 个符号之间的文本部分
- arm - ARM 寄存器定义 S3_0_C12_C12_7
- css - 在手机上以暗模式更改 html 电子邮件的背景颜色
- java - 如何使用 org.hibernate.criterion.Restrictions 代码将此 Hibernate 代码更改为 JPA。限制 API 有什么替代品吗?
- node.js - 如何在 Node TS 中的循环 WriteStream 中对文件的记录进行排序
- javascript - Dropzone保存多次
- aws-codepipeline - AWS CodePipeline:预计仅执行各自分支的代码管道
- python - 如何解决 Python 中的类继承问题?
- salesforce - Talend - tSalesForceInput 组件没有输出
- javascript - 如何在不更改按钮大小的情况下使图标更大?