ERROR TypeError: Cannot read property 'createText' of null in ngx-bootstrap with angular 6
问题 I want to open ngx-bootstrap modal from a different component using @ViewChild in angular 6 but I am getting this error. ERROR TypeError: Cannot read property 'createText' of null at ComponentLoader.push../node_modules/ngx-bootstrap/component-loader/component-loader.class.js.ComponentLoader._getContentRef And in in Inspect Element this tag is also visible <bs-modal-backdrop class="modal-backdrop fade in"></bs-modal-backdrop> 回答1: You can use the selector to call other component on a modal in