File
Constructor
constructor(params: NavParams, modalCtrl: ModalController, platform: Platform)
|
|
Parameters :
Name |
Type |
Optional |
params |
NavParams
|
No
|
modalCtrl |
ModalController
|
No
|
platform |
Platform
|
No
|
|
Public
platform
|
Type : Platform
|
|
import { Component } from '@angular/core';
import { ModalController, NavParams, Platform } from '@ionic/angular';
@Component({
selector: 'app-view-detail',
templateUrl: './view-detail.component.html',
styleUrls: ['./view-detail.component.scss'],
})
export class ViewDetailComponent {
submission: any;
constructor(params: NavParams, private modalCtrl: ModalController, public platform: Platform) {
this.submission = params.get('submission');
}
close() {
this.modalCtrl.dismiss();
}
}
<ion-toolbar [ngClass]="{'container': platform.is('ios')}">
<ion-buttons (click)="close()" slot="start" class="padding">
<ion-icon role="button" aria-label="close" name="close" slot="icon-only" style="padding-left: 10px;"></ion-icon>
</ion-buttons>
</ion-toolbar>
<ion-content>
<ion-card class="observationTitle">
<ion-card-content>
{{ submission?.entityName }}
</ion-card-content>
</ion-card>
<ion-card-content>
<h5>{{ submission?.title }}</h5>
<p>Created On : {{ submission?.createdAt | date }}</p>
<p *ngIf="submission?.submissionDate">
Submitted On :
{{ submission?.submissionDate | date }}
</p>
</ion-card-content>
</ion-content>
.container {
margin-top: env(safe-area-inset-top);
}
Legend
Html element with directive