32 lines
668 B
TypeScript
32 lines
668 B
TypeScript
|
import {
|
||
|
Component,
|
||
|
OnInit,
|
||
|
Input,
|
||
|
Output,
|
||
|
EventEmitter,
|
||
|
ChangeDetectorRef
|
||
|
} from '@angular/core';
|
||
|
import { ucapAnimations } from '../animations';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'ucap-integrated-search-form',
|
||
|
templateUrl: './integrated-search-form.component.html',
|
||
|
styleUrls: ['./integrated-search-form.component.scss'],
|
||
|
animations: ucapAnimations
|
||
|
})
|
||
|
export class IntegratedSearchFormComponent implements OnInit {
|
||
|
@Input()
|
||
|
searchWord?: string;
|
||
|
|
||
|
@Output()
|
||
|
search = new EventEmitter<string>();
|
||
|
|
||
|
constructor(private changeDetectorRef: ChangeDetectorRef) {}
|
||
|
|
||
|
ngOnInit() {}
|
||
|
|
||
|
onKeyDownEnter(keyword: string) {
|
||
|
this.search.emit(keyword);
|
||
|
}
|
||
|
}
|