Angular4 calling a function in constructor
问题 I'm trying to call a modal function in the constructor in Angular 4 but the function get highlighted that is not properly called and when the page is loaded not error is read in the log and the modal is not popping up as its suppose to. The screen gets dark alright but the text in the modal doesn't show up. constructor(public formBuilder: FormBuilder, public router: Router, public toastr: ToastrService, public http: HttpClient, public modalService: BsModalService,) { if (this.getWardData) {