目标:
用类“模态-lg”使模态成为大模态
问题:
当我尝试在不同的地方使用语法代码“modal”时,不知道如何解决这个问题。
信息:
*我是新来的
*使用VS代码和ngx-引导程序
谢谢!
https://stackblitz.com/edit/angular-nested-component-modal-ngx-bootstrap-not-working-ap7wnp
发布于 2019-07-30 10:27:35
我已经修改了您提供的StackBlitz链接上的代码。
以下是app.component.ts文件中的更改
<button type="button" class="btn btn-primary" (click)="openModal(template)">Create template modal</button>
<ng-template #template>
<div class="modal-header">
<h4 class="modal-title pull-left">Modal</h4>
<button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<i>I want Full Name here. First name I am able to get, but last name i am not able to get form nested model here</i>
<p> </p>
Full name: {{person.fname}}
<p> </p>
<input type="text" name="fname" placeholder="first Name" [(ngModel)]="person.fname" #fname="ngModel">
<p> </p>
<button type="button" class="btn btn-primary" (click)="openModalWithComponent()">Open Modal to enter last name</button>
</div>
</div>
</div>
</ng-template>我希望这对你有帮助
发布于 2019-08-15 22:42:53
内存中的ngx中有一个大小代码。LG,MD,SM.设置好它就能工作了。
https://stackoverflow.com/questions/57269428
复制相似问题