JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-controller="apiCtrl">
<button ng-click='yell()'>yell</button>
<br>
<input class='autocompleted' type='text' ng-model='tmpComp'/>
<ul>
<li ng-repeat='f in fish' tabIndex='-1'>
<a ng-click="$parent.yell()"> {{f}}
</a>
</li>
</ul>
</div>
CSS
input.autocompleted + ul {
display: none;
}
input.autocompleted:focus + ul {
padding: 2px;
margin: 1px;
list-style-type: none;
display: block;
position: absolute;
z-index: 2;
background-color: #FFF;
border: 1px solid #000;
}
JavaScript
function apiCtrl($scope) {
$scope.fish = [
'blum',
'blum',
'shub'
];
$scope.yell = function() {
alert("HEY");
};
}
$rootScope.log = function(variable) {
console.log(variable);
};
$rootScope.alert = function(text) {
alert(text);
};