You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemm_srca/Mohem/src/app/hmg-common/ui/footer/footer.component.ts

35 lines
954 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { KeyboardService } from '../../services/keyboard/keyboard.service';
import { Events, Platform } from '@ionic/angular';
import { KeyboardStatusModel } from '../../services/keyboard/keyboard-status.model';
@Component({
selector: 'footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.scss'],
})
export class FooterComponent implements OnInit {
public keyboardOpened = false;
constructor(
public events: Events,
public keyboardService: KeyboardService,
public platform: Platform
) { }
ngOnInit() {
this.platform.ready().then(() => {
this.keyboardOpened = KeyboardService.keyboardOpened;
this.monitorKeyboardChange();
});
}
private monitorKeyboardChange() {
this.events.subscribe ( KeyboardService.KEYBOARD_STATUS , ( status: KeyboardStatusModel) => {
this.keyboardOpened = status.opened;
});
}
}