Angular 以角度更改intl tel输入字段宽度

Angular 以角度更改intl tel输入字段宽度,angular,intl-tel-input,Angular,Intl Tel Input,我已经在我的角度应用程序中使用了。也可用于手机号码输入。 我有下面的HTML代码 <div class="form-control-group"> <label class="label" for="input-mobile">Mobile<span class="text-danger"> *</span></label>

我已经在我的角度应用程序中使用了。也可用于手机号码输入。 我有下面的HTML代码

<div class="form-control-group">
          <label class="label" for="input-mobile">Mobile<span class="text-danger"> *</span></label>
          <input nbInput type="text" id="input-mobile" class="input-mobile" name="mobile" placeholder="Mobile" fullWidth fieldSize="large" formControlName="mobile" inputmode="numeric" digitOnly [status]="status(formcontrols.mobile)"
            ng2TelInput [ng2TelInputOptions]="{initialCountry: 'in'}">
</div>
它运行良好。但我无法从样式文件中应用宽度属性,如下所示

.iti {
width:100%;
}
在component.scss中

.iti {
  width: 100%;
}
:host ::ng-deep .iti {
  width: 100%;
}

我终于成功了。我使用了以下方法:

在component.scss中

.iti {
  width: 100%;
}
:host ::ng-deep .iti {
  width: 100%;
}
原因

由于角度中的样式封装,因此未应用样式。有关更多信息,请参阅。

它为我工作。 我在component.css中添加了下面的代码

.iti--allow-dropdown {
  width: 100%;
}

以前的答案在新版本中不起作用。很遗憾,我无法删除!这是最好的选择,因为在
上使用
宽度:100%
。iti
会影响移动下拉菜单的行为。