Javascript 尝试在Angular 2应用程序上输入模态时出错

Javascript 尝试在Angular 2应用程序上输入模态时出错,javascript,angular,angular2-modal,Javascript,Angular,Angular2 Modal,我试图在Angular 2应用程序中插入模态,但出现以下错误: 未处理的承诺拒绝:模板分析错误:无法绑定到 “ShowDisclesh”,因为它不是“modal header”的已知属性 我正在使用ng2-bs3-modal插件。我觉得我在插件的设置上遗漏了一些东西 我已经在我的index.html上输入了这三行: <script src="node_modules/ng2-bs3-modal/bundles/ng2-bs3-modal.js"></script>

我试图在Angular 2应用程序中插入模态,但出现以下错误:

未处理的承诺拒绝:模板分析错误:无法绑定到 “ShowDisclesh”,因为它不是“modal header”的已知属性

我正在使用
ng2-bs3-modal
插件。我觉得我在插件的设置上遗漏了一些东西

我已经在我的
index.html
上输入了这三行:

  <script src="node_modules/ng2-bs3-modal/bundles/ng2-bs3-modal.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.js"></script>
  <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
我还在我的
app.module
上导入了
Ng2Bs3ModalModule

这是我得到错误的组件中的html:

  <button type="button" class="btn btn-default" (click)="modal.open()">Open me!</button>
  <modal #modal>
    <modal-header [showDismiss]="true">
        <h4 class="modal-title">I'm a modal!</h4>
    </modal-header>
    <modal-body>
        Hello World!
    </modal-body>
    <modal-footer [showDefaultButtons]="true"></modal-footer>
</modal>
打开我!
我是模态的!
你好,世界!

有人能帮我吗?提前谢谢。任何其他使用modal的插件都会被接受,但我已经尝试了其中的大多数插件,并且在这些插件上也出现了一些错误

阅读文档时,
showdesil
对于
不存在。您必须像
一样使用
显示关闭
。我不知道你是否在用另一个版本

  <button type="button" class="btn btn-default" (click)="modal.open()">Open me!</button>
  <modal #modal>
    <modal-header [showDismiss]="true">
        <h4 class="modal-title">I'm a modal!</h4>
    </modal-header>
    <modal-body>
        Hello World!
    </modal-body>
    <modal-footer [showDefaultButtons]="true"></modal-footer>
</modal>