diff --git a/demos/collection-repeat/index.html b/demos/collection-repeat/index.html index 6e6c76f271..6621c6e084 100644 --- a/demos/collection-repeat/index.html +++ b/demos/collection-repeat/index.html @@ -18,6 +18,10 @@ +
@@ -33,7 +37,7 @@
+ ng-style="{top: (100/letters.length)*$index + '%'}"> {{letter}}
@@ -54,6 +58,12 @@ position: absolute; z-index: 100; } +.button.button-icon.input-button { + position: absolute; + right: 0; + top: 5px; + color: #bbb; +} diff --git a/demos/collection-repeat/script.js b/demos/collection-repeat/script.js index 7af0ae456c..ca679ddac4 100644 --- a/demos/collection-repeat/script.js +++ b/demos/collection-repeat/script.js @@ -42,11 +42,12 @@ angular.module('contactsApp', ['ionic']) return item.isLetter ? 38 : 52; }; + var letterHasMatch = {}; $scope.getContacts = function() { + letterHasMatch = {}; //Filter contacts by $scope.search. //Additionally, filter letters so that they only show if there //is one or more matching contact - var letterHasMatch = {}; return contacts.filter(function(item) { var itemDoesMatch = !$scope.search || item.isLetter || item.first_name.toLowerCase().indexOf($scope.search.toLowerCase()) > -1 ||