首页 > 解决方案 > 无法使用 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); }
        );
      }

标签: typescriptionic-frameworkionic2ionic3

解决方案


推荐阅读