Skip to content

Instantly share code, notes, and snippets.

@Anticom
Created May 6, 2017 14:33
Show Gist options
  • Save Anticom/e78b249461fc1db2198b54c37fb80c17 to your computer and use it in GitHub Desktop.
Save Anticom/e78b249461fc1db2198b54c37fb80c17 to your computer and use it in GitHub Desktop.
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
@Component({
selector: 'app-search-bar',
template: `
<md-input-container class="search-bar">
<input mdInput #searchquery placeholder="Search">
<span md-prefix>
<i class="material-icons app-input-icon">search</i>&nbsp;
</span>
</md-input-container>
`,
styles: ['.search-bar { width: 100%; }']
})
export class SearchBarComponent implements OnInit {
@Output() queryUpdated = new EventEmitter<string>();
constructor() { }
ngOnInit() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment