如何在JavaScript函数中获取返回值以在angular2中输出组件?我的代码:
export function Select(checked) {
var items = new Array();
if (checked.length > 0) {
for (var i = 0; i < checked.length; i++) {
items.push(checked[i]);
}
}
return items;
}
并输出
@Output() selectedItem = new EventEmitter<Object>();
如何在selectedItem中获取返回值?
this.selectedItem.emit();