-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Input): added functionality for clear input option on ion-input
Implemented function to handle when the clearInput button is pressed on an ion-input element
- Loading branch information
unknown
authored and
unknown
committed
Apr 14, 2016
1 parent
c594c43
commit d8e2849
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
it('should clear input', function() { | ||
element(by.css('.e2eClearInput')).click(); | ||
expect(by.css('.e2eClearInput').getText()).toEqual(''); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {App} from 'ionic-angular'; | ||
|
||
|
||
@App({ | ||
templateUrl: 'main.html' | ||
}) | ||
class E2EApp { | ||
constructor() { | ||
this.myValue = 'value'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
<ion-toolbar> | ||
<ion-title>Clear Input</ion-title> | ||
</ion-toolbar> | ||
|
||
|
||
<ion-content> | ||
|
||
|
||
<ion-list> | ||
|
||
<ion-item> | ||
<ion-label>Text 1:</ion-label> | ||
<ion-input class="e2eClearInput" [(ngModel)]="myParam" clearInput></ion-input> | ||
</ion-item> | ||
|
||
|
||
</ion-list> | ||
|
||
</ion-content> |