We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I would like to use a callLog object in my component.
Below is my constructor:
import { Component } from '@angular/core'; import { Loading, LoadingController, AlertController } from 'ionic-angular'; @Component({ selector: 'page-spam', templateUrl: 'spam.html' }) export class SpamPage { constructor(public callLog: CallLog, public alertCtrl:AlertController, public loadingCtrl: LoadingController) { ... <snap> ... } }
Also CallLog is defined in the providers (app.components.ts). And the error I get is:
Typescript Error 'CallLog' refers to a value, but is being used as a type here.
Also if I want to define a callLog variable outside the constructor I need to do it like this:
callLog
callLog: typeOf CallLog
I must use typeOf.
I do not know what I am doing wrong. I followed some tutorials and it does not help me. I am using Typescript 3.4.5.
Can someone help me ? Thank you!
The text was updated successfully, but these errors were encountered:
For example this is not working: https://github.com/ban-ban/newcallduration/blob/master/src/providers/group-list/group-list.ts#L19
I am able to make it work if I directly uses CallLog:
import { CallLog, CallLogObject } from '@ionic-native/call-log'; @Component({ selector: 'page-spam', templateUrl: 'spam.html' }) export class SpamPage { constructor( public alertCtrl:AlertController, public loadingCtrl: LoadingController) { CallLog.requestReadPermission() .then(()=>{ CallLog.getCallLog(filters) .then((data)=>{ let duration:number = 0; for(let i=0; i<data.length;i++){ duration = duration+data[i].duration; }
Sorry, something went wrong.
No branches or pull requests
Hello,
I would like to use a callLog object in my component.
Below is my constructor:
Also CallLog is defined in the providers (app.components.ts).
And the error I get is:
Also if I want to define a
callLog
variable outside the constructor I need to do it like this:callLog: typeOf CallLog
I must use typeOf.
I do not know what I am doing wrong. I followed some tutorials and it does not help me. I am using Typescript 3.4.5.
Can someone help me ? Thank you!
The text was updated successfully, but these errors were encountered: