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.
37 lines
1015 B
TypeScript
37 lines
1015 B
TypeScript
import { Component, OnInit, Input } 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: 'scroll-content',
|
|
templateUrl: './scroll-content.component.html',
|
|
styleUrls: ['./scroll-content.component.scss'],
|
|
})
|
|
export class ScrollContentComponent implements OnInit {
|
|
|
|
|
|
public keyboardOpened = false;
|
|
@Input() fullView = 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;
|
|
});
|
|
}
|
|
|
|
}
|