如何解决无法读取属性'createText'为空
我对棱角非常陌生。我有一个模态,它会弹出一个单击按钮的窗口,并且在其他几个地方都需要此模版(按钮和模态),为此我创建了一个单独的组件,但不幸的是,我遇到了上述错误。
modal.component
export class NotificationModalComponent {
msgRef: BsModalRef;
constructor(private modalService: BsModalService ) { }
getNotify(template?:TemplateRef<any>){
this.msgRef = this.modalService.show(template);
}
<button (click)="popsModal('msgmodal')">
<ng-template #msgmodal>
<div class="modal-body text-center">
<h3>Allow Notifications</h3>
<small>Click allow to get push notifications</small>
</div>
</ng-template>
otherParentComponet
<app-modal></app-modal>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。