Fully working table org search and better error
This commit is contained in:
parent
f040a26794
commit
52de477cc2
7 changed files with 86 additions and 22 deletions
23
src/app/shared/org-table.component.ts
Normal file
23
src/app/shared/org-table.component.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { OrgResultComponent } from '../shared/org-result.component';
|
||||
|
||||
interface OrgData {
|
||||
id: number;
|
||||
name: string;
|
||||
street_name: string;
|
||||
town: string;
|
||||
postcode: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'org-table',
|
||||
templateUrl: 'org-table.component.html',
|
||||
})
|
||||
export class OrgTableComponent {
|
||||
@Input() public orgList: Array<OrgData>;
|
||||
@Output() public onClick = new EventEmitter();
|
||||
|
||||
public orgClick(event: any): void {
|
||||
this.onClick.emit( event );
|
||||
}
|
||||
}
|
Reference in a new issue