Angular 增加模型的大小
目标:Angular 增加模型的大小,angular,ngx-bootstrap,Angular,Ngx Bootstrap,目标: 使用“modal lg”类将modal设置为大型modal 问题: 当我尝试在不同的地方使用语法代码“modal lg”时,我不知道如何解决这个问题 信息: *我是新来的。 *使用VS代码和ngx引导 谢谢大家! 我已经修改了您提供的StackBlitz链接上的代码 以下是app.component.ts文件中的更改 <button type="button" class="btn btn-primary" (click)="openModal(template)">Crea
使用“modal lg”类将modal设置为大型modal 问题:
当我尝试在不同的地方使用语法代码“modal lg”时,我不知道如何解决这个问题 信息:
*我是新来的。
*使用VS代码和ngx引导 谢谢大家!
我已经修改了您提供的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>
创建模板模式
情态动词
&时代;
我要全名。我可以从嵌套模型中获取名字,但无法获取姓氏
全名:{{person.fname}
打开Modal以输入姓氏
我希望这对您有所帮助内存中的ngx中有一个大小代码。LG,MD,SM。设置该选项后,一切正常。我尝试了您的解决方案,但没有得到大尺寸的modal。