Add rename page functionality

This commit is contained in:
Andras Schmelczer 2019-09-08 16:10:33 +02:00
parent 3101c973eb
commit 3a1accaae1
18 changed files with 201 additions and 63 deletions

View file

@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import { ChangeDetectorRef, Component } from '@angular/core';
import { ModalService, ModalType } from '../../services/modal.service';
@Component({
@ -7,14 +7,18 @@ import { ModalService, ModalType } from '../../services/modal.service';
styleUrls: ['./modal.component.scss']
})
export class ModalComponent {
// Needed for accessing the enum from html.
ModalType = ModalType;
constructor(public modalService: ModalService) {
constructor(public modalService: ModalService, private changeDetectionRef: ChangeDetectorRef) {
window.addEventListener('keydown', (event: KeyboardEvent) => {
if (event.key === 'Escape') {
this.modalService.cancel();
}
});
/*window.addEventListener('resize', (_: UIEvent) => {
console.log('resize');
this.changeDetectionRef.markForCheck();
});*/
}
}