[英]PrimeNG Listbox not showing label
The "rolename" label refuses to render on the UI; “角色名称”标签拒绝在用户界面上呈现; I am using Angular 4/Prime NG
我正在使用Angular 4 / Prime NG
.html file definition .html文件定义
<p-listbox formControlName="userRole" [options]="this.userRoleItems" optionLabel="rolename" multiple="multiple" [style]='{"width":"250px"}' checkbox="checkbox" filter="filter"
>
</p-listbox>
constructor of .ts file .ts文件的构造函数
userRoleItems: UserRole[] = [{id: 2, rolename: 'test'}]; ;
userrole class definition: userrole类的定义:
export class UserRole {
id: number;
rolename: string;
}
Picture of how it is on the UI: (You see the checkbox shows but not tthe label) UI上的图片:(您看到复选框显示但标签未显示)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.