Angular BsModalModule错误TS2339:属性';打开';不存在于类型';BsModalModule';
目前我正在学习Angular 4应用程序;我正在尝试添加用于添加记录的模型窗口。为此,我在第页中创建了模型。我还从NPM安装了Angular BsModalModule错误TS2339:属性';打开';不存在于类型';BsModalModule';,angular,angular5,Angular,Angular5,目前我正在学习Angular 4应用程序;我正在尝试添加用于添加记录的模型窗口。为此,我在第页中创建了模型。我还从NPM安装了ng2-bs3-modal软件包。我使用VS代码来实现应用程序 我的组件类正在导入下面的参考 import { BsModalModule } from 'ng2-bs3-modal'; 在myComponentview引用中调用,如下所示: the export class myComponent implements OnInit { @ViewChild('mo
ng2-bs3-modal
软件包。我使用VS代码来实现应用程序
我的组件类正在导入下面的参考
import { BsModalModule } from 'ng2-bs3-modal';
在myComponentview引用中调用,如下所示:
the export class myComponent implements OnInit {
@ViewChild('modal') modal : BsModalModule;
用于添加数据的函数
adddata() {
this.dbops = DBOperation.create;
this.Frm.reset();
this.modal.open();
}
在HTML页面中
<modal #modal>
my form code here.
</modal>
如何解决此错误?我已尝试格式化您的代码并改进拼写,但这确实不清楚,因此请仔细检查并编辑您的问题,使其更清晰,包括其代码片段。您好,谢谢您的评论。我正在angular和Core.Net中创建新的应用程序。我已经创建了WebAPI。现在我正在研究角度应用。我试着按照下面的文章。但在实现应用程序时,我面临着我在这里提出的问题。当我生成应用程序时,我遇到上面提到的错误,请提前感谢。乌姆卡。
error TS2339: Property 'open' does not exist on type 'BsModalModule'.