无法使用ionic 3本机日历插件

时间:2019-02-12 09:22:54

标签: typescript ionic-framework ionic2 ionic3

我正在尝试在项目中使用离子日历插件,但是 :每当我尝试显示日历时,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); }
        );
      }

0 个答案:

没有答案