forked from cypress-io/cypress-example-phonecat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add a search box to demonstrate: - How the data-binding works on input fields. - How to use the `filter` filter. - How `ngRepeat` automatically shrinks and grows the number of phones in the view. - Add an end-to-end test to: - Show how end-to-end tests are written and used. - Prove that the search box and the repeater are correctly wired together.
- Loading branch information
1 parent
401ee34
commit 5da7558
Showing
2 changed files
with
42 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
<ul> | ||
<li ng-repeat="phone in $ctrl.phones"> | ||
<span>{{phone.name}}</span> | ||
<p>{{phone.snippet}}</p> | ||
</li> | ||
</ul> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-md-2"> | ||
<!--Sidebar content--> | ||
|
||
Search: <input ng-model="$ctrl.query" /> | ||
|
||
</div> | ||
<div class="col-md-10"> | ||
<!--Body content--> | ||
|
||
<ul class="phones"> | ||
<li ng-repeat="phone in $ctrl.phones | filter:$ctrl.query"> | ||
<span>{{phone.name}}</span> | ||
<p>{{phone.snippet}}</p> | ||
</li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
</div> |
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