<html>
<head>
<title>HTML Document</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
</head>
<body>
<div id="hover-id">
Hello World
</div>
<script>
jQuery(document).ready(function($){
$(document).on('mouseover', '#hover-id', function(){
$(this).css('color','yellowgreen');
});
$(document).on('mouseout', '#hover-id', function(){
$(this).css('color','black');
});
});
</script>
</body>
</html>
У меня есть рабочий пример базы в вашем коде, единственное отличие между вашим и моим - это проверка сервиса
@Injectable()
export class SearchbarService {
constructor() { }
public getSearchResults(value) {
const arr = [1,2,3,4,5,6]
return of([...arr.map(c=> Math.floor(Math.random() * 100))]); // return an observable
}
}
демонстрация stackblitz [113 ]