import {Component, Input, Output, EventEmitter} from '@angular/core'; @Component({ selector: 'search-sorting', template: `
Sort by: Relevance Date (most recent) Date (least recent) class="uk-text-bold matSelection" id="form-horizontal-select" name="select_results_per_page" [(ngModel)]="sortBy" (ngModelChange)="sortByChanged()" [disableOptionCentering]="true" panelClass="matSelectionPanel"> Title Creation Date (most recent) Creation Date (least recent)
` }) export class SearchSortingComponent { @Input() sortBy: string = ''; @Input() entityType: string = ''; @Output() sortByChange = new EventEmitter(); constructor () {} ngOnInit() {} sortByChanged() { this.sortByChange.emit({ value: this.sortBy }); } }