Last active
August 13, 2023 08:24
-
-
Save GreenFlag31/93e67be2fc3bade457d7674932f359a6 to your computer and use it in GitHub Desktop.
app component class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class AppComponent { | |
// Query the #view element in the template, expecting it to be of type ViewContainerRef | |
// and store the reference in the variable vcr. | |
@ViewChild('view', { static: true, read: ViewContainerRef }) | |
vcr!: ViewContainerRef; | |
constructor(private modalService: ModalService) {} | |
openModalTemplate(view: TemplateRef<Element>) { | |
this.modalService.open(this.vcr, view, { | |
animations: { | |
modal: { | |
enter: 'enter-slide-down 0.8s', | |
}, | |
overlay: { | |
enter: 'fade-in 0.8s', | |
leave: 'fade-out 0.3s forwards', | |
}, | |
}, | |
size: { | |
width: '40rem', | |
}, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment