如何在mat-form-field元素中的下划线类之间添加空格?

时间:2018-09-20 11:02:41

标签: angular forms angular-material angular-material-5

我正在尝试添加多个表单域,我想连续添加2个表单域,但无法在表单域之间添加空格(无法分隔下划线)

 <li>
    <mat-form-field>
      <input matInput [(ngModel)]="name" placeholder="What's your name?">
    </mat-form-field>
    <mat-form-field>
      <input matInput [(ngModel)]="name" placeholder="hello">
    </mat-form-field>
  </li>

Stackblitz:https://stackblitz.com/edit/angular-rqczqy

我想在“你的名字”和“你好”之间留一个空格

我该如何实现? 任何帮助将不胜感激!

1 个答案:

答案 0 :(得分:2)

您可以使用The current value in focus is (9) and it's max is (50)解决此问题。我分叉了你的闪电战。这里是许多解决方案之一:Inline matInput

模板

Error. Value (9) exceeds max (50)

CSS

flexbox