search-bar.component.ts 608 Bytes
Newer Older
mdsecurity's avatar
mdsecurity committed
1
import { Component, OnInit } from '@angular/core';
mdsecurity's avatar
mdsecurity committed
2
import {SearchService} from '../search.service';
mdsecurity's avatar
mdsecurity committed
3
4
5
@Component({
	selector: 'app-search-bar',
	templateUrl: './search-bar.component.html',
mdsecurity's avatar
mdsecurity committed
6
	styleUrls: ['./search-bar.component.scss'],
mdsecurity's avatar
mdsecurity committed
7
8
9
10
11
12
13
})
export class SearchBarComponent implements OnInit {
	choices = [
		{ value: "fairfax", viewValue: "Fairfax Campus" },
		{ value: "arlington", viewValue: "Arlingron Campus" },
		{ value: "princeWilliam", viewValue: "Prince William Campus" }
	];
mdsecurity's avatar
mdsecurity committed
14
	constructor(private search:SearchService) { }
mdsecurity's avatar
mdsecurity committed
15
16
17

	ngOnInit() {
	}
mdsecurity's avatar
mdsecurity committed
18
19
20
	onKey(event){
		this.search.newTerm(event.target.value);
	}
mdsecurity's avatar
mdsecurity committed
21
22

}