File
Constructor
constructor(popOverCtrl: PopoverController, socialSharing: SocialSharing, navParams: NavParams)
|
|
Parameters :
Name |
Type |
Optional |
popOverCtrl |
PopoverController
|
No
|
socialSharing |
SocialSharing
|
No
|
navParams |
NavParams
|
No
|
|
Methods
ionViewWillEnter
|
ionViewWillEnter()
|
|
|
import { Component } from '@angular/core';
import { NavParams, PopoverController } from '@ionic/angular';
import { SocialSharing } from '@ionic-native/social-sharing/ngx';
@Component({
selector: 'app-copy-trace-id-popover',
templateUrl: './copy-trace-id-popup.component.html'
})
export class CopyTraceIdPopoverComponent {
traceId: string;
constructor(
private popOverCtrl: PopoverController,
private socialSharing: SocialSharing,
private navParams: NavParams
) { }
ionViewWillEnter() {
this.traceId = this.navParams.get('traceId');
}
close() {
this.popOverCtrl.dismiss();
}
copy(){
this.popOverCtrl.dismiss();
this.socialSharing.share(this.traceId);
}
}
<ion-header class="sb-popover-header">
<ion-toolbar class="sb-popover-toolbar">
<ion-title class="sb-popover-title">{{'COPY_TRACE_ID' | translate}}
<ion-icon name="close" class="sb-modal-close" (click)="close()"></ion-icon>
</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="sb-popover-container ion-no-padding">
<div class="sb-popover-items">
<div class="sb-popover-content-details">
{{'COPY_TRACE_ID_DESC' | translate}}
</div>
</div>
</ion-content>
<ion-footer>
<div class="sb-popover-footer">
<button class="sb-popover-action-btn popover-color" (click)="copy()">{{'COPY' | translate}}</button>
</div>
</ion-footer>
Legend
Html element with directive