Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. search: any;
  2.  
  3. ngOnInit() {
  4.  
  5. this.search = instantsearch({
  6. searchClient: algoliasearch(
  7. '5SRF6DY7XY',
  8. 'a2cc46cbc3b02e3f93e1a914fe2528ea'),
  9. indexName: 'test'
  10. });
  11.  
  12. this.search.addWidget(
  13. instantsearch.widgets.hits({
  14. container: '#hits',
  15. })
  16. );
  17.  
  18. this.search.addWidget(
  19. instantsearch.widgets.searchBox({
  20. container: '#search-box'
  21. })
  22. );
  23. this.search.start();
  24.  
  25.  
  26.  
  27. }
  28.  
  29. import instantsearch from 'instantsearch.js';
  30. declare var instantsearch: any;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement