Skip to content

Commit

Permalink
added window.alert
Browse files Browse the repository at this point in the history
  • Loading branch information
ry8806 committed Oct 14, 2016
1 parent 7bea4eb commit 272bbb8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion WebApp/src/WebApp/app/searchbox.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@Component({
selector: 'search-box',
template: `<div>
<input type="text" placeholder="lets get searching..." />
<input #box type="text" (keyup.enter)="displayAlert(box.value)" placeholder="lets get searching..." />
</div>`
})
export class SearchboxComponent {
Expand All @@ -13,4 +13,8 @@ export class SearchboxComponent {
constructor() {
this.text;
}

displayAlert(msg: string) {
window.alert(msg);
}
}

0 comments on commit 272bbb8

Please sign in to comment.