My Question id related to a previous thread answer. Angular 7 Hide bootstrap modal in typscript
The Solution provided to hide the modal in typescript code was to have the @ViewChild(ModalDirective) modal : ModalDirective access the local reference and then use method hide on that.
But according to my understanding as a beginner to Angular @ViewChild('modal') modal : ModalDirective should be used since @ViewChild takes local reference as an argument. Then why have we passed ModalDirective.