angular-hotel-manager/src/app/Search/search.component.ts

20 lines
577 B
TypeScript

import { CommonModule } from '@angular/common';
import { Component, NgModule } from '@angular/core';
import { FormsModule, NgForm, NgModel } from '@angular/forms';
import { Input, Output } from '@angular/core';
import { EventEmitter } from '@angular/core';
@Component({
selector: 'app-search',
standalone: true,
templateUrl: './search.component.html',
imports: [FormsModule],
})
export class SearchComponent {
@Input() public input: string = '';
@Output() inputChange = new EventEmitter<string>();
public update(e: string) {
this.inputChange.emit(e);
}
}