Files
ionic-framework/ionic/components/searchbar/test/floating/index.ts
Brandy Carney 8a51ca2834 refactor(searchbar): Added an input trigger and moved some of the properties around
Added descriptions and private to the functions and improved docs for
searchbar. References #666
2015-12-03 12:30:15 -05:00

36 lines
852 B
TypeScript

import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/angular2';
import {App} from 'ionic/ionic';
import {SearchPipe} from 'ionic/components/searchbar/searchbar';
@App({
templateUrl: 'main.html',
directives: [FORM_DIRECTIVES]
})
class E2EApp {
defaultSearch: string;
customPlaceholder: string;
defaultCancel: string;
customCancel: string;
customCancelLong: string;
customCancelAction: string;
clickedCustomAction: boolean = false;
constructor() {
}
myCancelAction(event, query) {
console.log("Clicked cancel action with", query);
this.clickedCustomAction = true;
}
triggerInput() {
// The defaultSearch doesn't get updated before this function is called
// so we have to wrap it in a timeout
setTimeout(() => {
console.log(this.defaultSearch);
});
}
}