【问题标题】:How to set custom template for kendo-ui multiselect with angular-formly如何使用角度形式为 kendo-ui 多选设置自定义模板
【发布时间】:2016-07-10 15:02:14
【问题描述】:

我正在尝试使用 kedno-ui 多选和 angular-formly 为多选创建自定义模板。我只能获得正常的选择下拉字段而没有多节... 这是我在jsbin上的示例

【问题讨论】:

    标签: angularjs kendo-ui angular-formly


    【解决方案1】:

    已通过配置应用运行解决。

     `app.run(function (formlyConfig) {
        formlyConfig.setType({
            name: 'multiSelect',
            extends: 'select',
            template: '<select kendo-multi-select k-options="" ng-model="model[options.key]" class="form-control" multiple></select>'
        });
    });`
    

    设置文件是这样的。

    `vm.fields = [       
      {
        key: 'multiSelect',
        type: 'multiSelect',
        templateOptions: {
          type: 'multiSelect',
          label: 'Fruits',          
          options: data
        }
      },`
    

    你可以看例子here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-08
      • 1970-01-01
      • 2013-09-26
      • 1970-01-01
      • 1970-01-01
      • 2023-03-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多