Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/27.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
Angular 增加模型的大小_Angular_Ngx Bootstrap - Fatal编程技术网

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">&times;</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>&nbsp;</p>
          Full name: {{person.fname}}
          <p>&nbsp;</p>
          <input type="text" name="fname" placeholder="first Name" [(ngModel)]="person.fname"     #fname="ngModel">
          <p>&nbsp;</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。