44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { Router, NavigationExtras, ActivatedRoute } from '@angular/router'
|
|
import {
|
|
NavController,
|
|
AlertController,
|
|
LoadingController,
|
|
} from '@ionic/angular'
|
|
|
|
|
|
@Component({
|
|
selector: 'app-merms-patient',
|
|
templateUrl: './merms-patient.page.html',
|
|
styleUrls: ['./merms-patient.page.scss'],
|
|
})
|
|
export class MermsPatientPage implements OnInit {
|
|
patient_name: string = "Selected Patient";
|
|
patientData: any;
|
|
constructor(public navCtrl: NavController, private router: Router, private route: ActivatedRoute) {
|
|
console.log('-----------------------------xxxx-----------------------------');
|
|
console.log(this.route.data);
|
|
|
|
this.route.queryParams.subscribe(params => {
|
|
console.log(params);
|
|
this.patient_name = params.firstname + ' ' + params.lastname;
|
|
if (params && params.special) {
|
|
this.patientData = JSON.parse(params.special);
|
|
console.log(this.patientData);
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
ngOnInit() {
|
|
console.log('-----------------------------yyyyy-----------------------------');
|
|
|
|
}
|
|
goBack() {
|
|
this.navCtrl.pop()
|
|
}
|
|
goHome() {
|
|
this.router.navigateByUrl('/merms-dash')
|
|
}
|
|
}
|