cordova - Ionic 2 social sharing throws cordova_not_available error -
i using ionic 2 framework, i'm trying work social-sharing plugin. in process throws cordova_not_available error.
below typescript code:
import { component } '@angular/core'; import { navcontroller, navparams } 'ionic-angular'; import { socialsharing } '@ionic-native/social-sharing'; @component({ selector: 'page-view-awareness', templateurl: 'view-awareness.html' }) export class viewawarenesspage { public email : any; constructor(public navctrl: navcontroller, public navparams: navparams, public socialsharing : socialsharing) {} ionviewdidload() { console.log('ionviewdidload viewawarenesspage'); } shareviatwitter(){ this.email = 'sekhar.technodrive@gmail.com'; this.socialsharing.shareviaemail('body', 'subject', this.email).then(() => { alert("success"); }).catch((data) => { alert(data); }); } }
please 1 me, in advance.
Comments
Post a Comment