mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
Refactor(searchbar): Remove unused variables, remove console.log, and comments in index.tj and main.html
This commit is contained in:
@ -22,9 +22,6 @@ class IonicApp {
|
||||
searchQuery: ['', Validators.required]
|
||||
});
|
||||
|
||||
|
||||
this.query = 'HELLO';
|
||||
|
||||
this.items = []
|
||||
for(let i = 0; i < 100; i++) {
|
||||
this.items.push({
|
||||
@ -35,8 +32,6 @@ class IonicApp {
|
||||
|
||||
getItems() {
|
||||
var q = this.form.controls.searchQuery.value;
|
||||
console.log('getItem', q);
|
||||
// debugger;
|
||||
if(q.trim() == '') {
|
||||
return this.items;
|
||||
}
|
||||
|
@ -5,10 +5,8 @@
|
||||
<form [ng-form-model]="form">
|
||||
|
||||
<ion-search-bar ng-control="searchQuery"></ion-search-bar>
|
||||
|
||||
<ion-list inset #list>
|
||||
|
||||
<ion-item *ng-for="#item of getItems()"><!--items | search:form.controls.searchControl.value">-->
|
||||
<ion-item *ng-for="#item of getItems()">
|
||||
{{item.title}}
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
Reference in New Issue
Block a user