Skip to content

Instantly share code, notes, and snippets.

@clintonyeb
Created May 19, 2020 02:37
Show Gist options
  • Save clintonyeb/e864e408fd209dc87e1ca03df89a386d to your computer and use it in GitHub Desktop.
Save clintonyeb/e864e408fd209dc87e1ca03df89a386d to your computer and use it in GitHub Desktop.
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { Search } from '../models/Search';
@Component({
selector: 'thead[app-header]',
templateUrl: './header.component.html',
styleUrls: ['./header.component.scss'],
})
export class HeaderComponent {
@Output() search = new EventEmitter<Search>();
@Output() sort = new EventEmitter();
constructor() {}
onSort() {
this.sort.emit();
}
onSearch(event: Search) {
this.search.emit(event);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment