added fake array

This commit is contained in:
Jon Lambson 2017-08-23 17:07:15 -06:00
parent 75b72dd97a
commit 2dc2dcf9fe
2 changed files with 16 additions and 19 deletions

View File

@ -254,16 +254,17 @@ app.controller('websiteCtrl', [
vm.listSites();
$scope.domain = [
{ domainName: "jon.lambson.daplie.com" },
{ domainName: "music.daplie.me" },
{ domainName: "jon.daplie.me" }
{ domain: "jon.lambson.daplie.com" },
{ domain: "music.daplie.me" },
{ domain: "jon.daplie.me" }
];
$scope.localDomainSearch = function(str, domain) {
var matches = [];
domain.forEach(function(domain) {
if ((domain.domainName.toLowerCase().indexOf(str.toString().toLowerCase()) >= 0)) {
if ((domain.domain.toLowerCase().indexOf(str.toString().toLowerCase()) >= 0)) {
matches.push(domain);
}
});

View File

@ -76,18 +76,14 @@
</div>
<div angucomplete-alt
placeholder="Select a domain"
pause="300"
selected-object="selectedPerson"
local-data="domain"
local-search="localDomainSearch"
title-field="domainName"
minlength="0"
input-class="form-control form-control-small"
match-class="highlight">
</div>
<div angucomplete-alt
placeholder="Select a domain"
pause="300"
selected-object="selectedDomain"
local-data="domain"
local-search="localDomainSearch"
title-field="domain"
minlength="0"
input-class="form-control form-control-small"
match-class="highlight">
</div>