【发布时间】:2019-03-22 14:26:48
【问题描述】:
Prime NG 多选初始化值看不到选中的复选框
初始化方法
this.cities = [
{label: 'New York', value: 'NY'},
{label: 'Rome', value: 'RM'},
{label: 'London', value: 'LDN'},
{label: 'Istanbul', value: 'IST'},
{label: 'Paris', value: 'PRS'}];
let selectedT: Country[];
selectedT = [{label: "Rome", value: "RM"}];
this.dForm.controls["selectedCities"].setValue([{label: "Rome", value: "RM"}]);
【问题讨论】: