Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 引导中的模态背景淡入显示 问题_Javascript_Html_Angular_Twitter Bootstrap - Fatal编程技术网

Javascript 引导中的模态背景淡入显示 问题

Javascript 引导中的模态背景淡入显示 问题,javascript,html,angular,twitter-bootstrap,Javascript,Html,Angular,Twitter Bootstrap,我陷入了引导问题(可能)。我的HTML文件中有模态。当我调用该模式时,它显示为淡入效果` 我的情态: 使用OnDestroy打开并使用modal实现的组件,然后 ngOnDestroy(){ // dismiss your modal here } 在模态内部,对用于关闭模态的元素使用“数据解除”属性。这样:Yes如何在组件中打开模态?@pc\u coder感谢您的快速关注。我已经更新了这个问题。你们能参考一下吗?你们能在下面的回答中检查演示吗@otto Chan你们能添加一个例子吗。因为

我陷入了引导问题(可能)。我的HTML文件中有模态。当我调用该模式时,它显示为淡入效果`

我的情态:

使用
OnDestroy打开并使用modal
实现的组件
,然后

ngOnDestroy(){
  // dismiss your modal here
}

在模态内部,对用于关闭模态的元素使用“数据解除”属性。这样:
Yes

如何在组件中打开模态?@pc\u coder感谢您的快速关注。我已经更新了这个问题。你们能参考一下吗?你们能在下面的回答中检查演示吗@otto Chan你们能添加一个例子吗。因为我是一个角度的新手。非常感谢:)
<div class="card text-center" *ngIf="touched">
    <img class="card-img-top" src="../../assets/svg/mailSent.svg" alt="Card image cap" style="  display: block;
        margin-left: auto;
        margin-right: auto;
        width: 10%;">
    <div class="card-body">
        <button  type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">ENTER CODE</button> <!-- This is the button that I use to open my modal -->
    </div>
</div>
ngOnDestroy(){
  // dismiss your modal here
}