我試圖使用https://v4-alpha.getbootstrap.com/components/modal/中的一個例子,在我的導航欄中添加一個模式,但是當點擊什麼都不會發生。Boostrap 4 Modal沒有在Angular 2上工作
<div class="pos-f-t fixed-top header">
<nav class="navbar navbar-inverse bg-inverse navbar-toggleable-md">
<button class="navbar-toggler navbar-toggler-right" (click)="toggleSidebar()">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="javascript:void(0)">Calculadora ISDB-Tb</a>
<!-- Small modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-sm">Small modal</button>
<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
...
</div>
</div>
</div>
</nav>
</div>
您使用'@角/ material'最後,我從改變的jQuery的import語句? – masterpreenz
@masterpreenz嗯不知道是什麼:/ –
如果你不使用ngx-bootstrap/ng-bootstrap。你可能忘了添加jquery – brijmcq