perbaikan master
This commit is contained in:
@@ -12,17 +12,20 @@ interface Icon {
|
||||
export class SelectIconComponent {
|
||||
// @Output() iconSelected: EventEmitter<string> = new EventEmitter<string>();
|
||||
@Output() iconSelected = new EventEmitter<string>();
|
||||
@Input() selectedIcon: string;
|
||||
@Input() selectedIcon = undefined;
|
||||
icons: any[] = [];
|
||||
constructor(private masterService: MasterService) {}
|
||||
ngOnInit(): void {
|
||||
this.masterService.getIconData().subscribe((res) => {
|
||||
this.icons = res.rows;
|
||||
});
|
||||
if (!this.selectedIcon) {
|
||||
this.selectedIcon = undefined;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onSelect(icon: Icon): void {
|
||||
console.log(icon);
|
||||
if (icon) {
|
||||
this.iconSelected.emit(icon.icon);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user