问题描述
我对棱角非常陌生。我有一个模态,它会弹出一个单击按钮的窗口,并且在其他几个地方都需要此模版(按钮和模态),为此我创建了一个单独的组件,但不幸的是,我遇到了上述错误。
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 (将#修改为@)