Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.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
Html 选择控制按钮';在Azure中发布时不显示_Html_Angular_Azure_Select_Formgroups - Fatal编程技术网

Html 选择控制按钮';在Azure中发布时不显示

Html 选择控制按钮';在Azure中发布时不显示,html,angular,azure,select,formgroups,Html,Angular,Azure,Select,Formgroups,我这里的情况很奇怪。我有一个选择控制在网页上的角度。它在本地环境中正确显示。 但是,当我将其发布到Azure时,select控件没有正确显示 这是本地节目。 这是在Azure网站上显示的。 这是本地站点上选择控制的检查。看起来不错。 这是Azure站点上选择控件的检查。可以看出,select控件是空的。 这是用于选择控件的html,我创建了一个用于自定义显示的组件 <div class="dynamic-field row" [formGroup]="

我这里的情况很奇怪。我有一个选择控制在网页上的角度。它在本地环境中正确显示。 但是,当我将其发布到Azure时,select控件没有正确显示

这是本地节目。

这是在Azure网站上显示的。

这是本地站点上选择控制的检查。看起来不错。

这是Azure站点上选择控件的检查。可以看出,select控件是空的。

这是用于选择控件的html,我创建了一个用于自定义显示的组件

<div class="dynamic-field row" [formGroup]="group">
  <label class="col-form-label" [ngClass]="'col-'+config.labelSize" *ngIf="config.labelSize!==0">{{ config.label }}</label>
  <div [ngClass]="'col-'+ (12 - (config.labelSize||0))">
    <div class="input-group input-group-sm">
      <div class="input-group-prepend" *ngIf="config.prepend">
        <span class="input-group-text" *ngIf="!config.prependConfig" [innerHTML]="config.prepend"></span>
        <span class="input-group-text cursor-pointer" *ngIf="config.prependConfig" cspsDynamicFormModalLink [innerHTML]="config.prepend"
              [config]="config.prependConfig"></span>
      </div>
      <select [formControlName]="config.name" class="form-control">
        <option [ngValue]="undefined" *ngIf="config.placeholder">{{ config.placeholder }}</option>
        <option [ngValue]="option.key" *ngFor="let option of options">
          {{ option.value }}
        </option>
      </select>
      <div class="input-group-append" *ngIf="config.append">
        <span class="input-group-text" *ngIf="!config.appendConfig" [innerHTML]="config.append"></span>
        <span class="input-group-text cursor-pointer" *ngIf="config.appendConfig" cspsDynamicFormModalLink [innerHTML]="config.append"
              [config]="config.appendConfig"></span>
      </div>
    </div>
  </div>
</div>

{{config.label}}
{{config.placeholder}
{{option.value}}
以下是ts文件:

@Component({
  selector: 'form-select',
  templateUrl: 'form-select.component.html',
  styleUrls: ['form-select.component.css']
})
export class FormSelectComponent implements Field, OnInit {
  config: FieldConfig;
  group: FormGroup;
  options: { key: any, value: string }[];

  ngOnInit() {
    const sorter = {
      asc: (a: { value: string }, b: { value: string }) => { return a.value === b.value ? 0 : (a.value > b.value ? 1 : -1) },
      desc: (a: { value: string }, b: { value: string }) => { return a.value === b.value ? 0 : (a.value < b.value ? 1 : -1) },
      none: undefined
    }

    this.config.sortOptions = this.config.sortOptions || 'none';

    if (this.config.options)
      this.options = this.config.options.sort(sorter[this.config.sortOptions]);
    else
      this.options = [];
  }

}
@组件({
选择器:“表单选择”,
templateUrl:'form select.component.html',
样式URL:['form-select.component.css']
})
导出类FormSelectComponent实现字段,OnInit{
配置:FieldConfig;
组:FormGroup;
选项:{key:any,value:string}[];
恩戈尼尼特(){
常数分类器={
asc:(a:{value:string},b:{value:string})=>{返回a.value===b.value?0:(a.value>b.value?1:-1)},
描述:(a:{value:string},b:{value:string})=>{返回a.value===b.value?0:(a.value
谁能给我一些建议吗?或者告诉我发生了什么? 谢谢