File
Constructor
constructor(popOverCtrl: PopoverController, navParams: NavParams, commonUtilService: CommonUtilService)
|
|
Parameters :
Name |
Type |
Optional |
popOverCtrl |
PopoverController
|
No
|
navParams |
NavParams
|
No
|
commonUtilService |
CommonUtilService
|
No
|
|
Methods
ionViewWillEnter
|
ionViewWillEnter()
|
|
|
certificateDescription
|
Type : string
|
Default value : ''
|
|
isCertified
|
Default value : false
|
|
isOnline
|
Default value : true
|
|
import { Component } from '@angular/core';
import { NavParams, PopoverController } from '@ionic/angular';
import { CommonUtilService } from '@app/services';
@Component({
selector: 'app-my-groups-popover',
templateUrl: './sb-course-completion-popup.component.html'
})
export class CourseCompletionPopoverComponent {
isCertified = false;
isOnline = true;
certificateDescription = '';
course;
constructor(
private popOverCtrl: PopoverController,
private navParams: NavParams,
private commonUtilService: CommonUtilService
) { }
ionViewWillEnter() {
this.isCertified = this.navParams.get('isCertified');
this.certificateDescription = this.navParams.get('certificateDescription');
this.isOnline = this.commonUtilService.networkInfo.isNetworkAvailable;
this.course = this.navParams.get('course');
}
close() {
this.popOverCtrl.dismiss();
}
}
<ion-content>
<div class="course-completion-popup-container">
<div class="cc-popup-close clearfix">
<ion-icon class="pull-right" name="close" (click)="close()"></ion-icon>
</div>
<div class="ion-text-center">
<div>
<img src="assets/imgs/Badge green.svg" alt="">
</div>
<div class="course-completion-title">{{'CONGRATULATIONS' | translate}}</div>
<div class="course-completion-info">{{'FRMELEMNTS_MSG_TRAINING_COMPLETED_SUCCESSFULLY' | categoryKeyTranslate : course }}</div>
<div class="course-completion-cert" *ngIf="isCertified">
<p *ngIf="certificateDescription; else defaultDescription">{{certificateDescription}}</p>
<ng-template #defaultDescription>{{'FRMELEMNTS_MSG_COURSE_COMPLETION_POPUP_DESC' | categoryKeyTranslate : course }}</ng-template>
</div>
<div class="course-completion-cert" *ngIf="isOnline && !isCertified">
{{'FRMELEMNTS_MSG_COURSE_COMPLETION_POPUP_NO_CERTIFICATE' | categoryKeyTranslate : course }}
</div>
</div>
</div>
</ion-content>
Legend
Html element with directive