Skip to content

Instantly share code, notes, and snippets.



Forked from JeffreyWay/ex.js
Created May 17, 2017
What would you like to do? Episode: Algolia + JavaScript + Vue
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Algolia with JS</title>
<link rel="stylesheet" href="app.css">
<input type="text" v-model="query" v-on="keyup: search | key 'enter'">
<div class="results">
<article v-repeat="user: users">
<h2>{{{ }}}</h2>
<h4 v-html=""></h4>
<script src=""></script>
<script src=""></script>
new Vue({
el: 'body',
data: { query: '', users: [] },
ready: function() {
this.client = algoliasearch('YOUR_APP_ID', 'YOUR_APP_SEARCH_KEY');
this.index = this.client.initIndex('test_drive_contacts');
methods: {
search: function() {, function(error, results) {
this.users = results.hits;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.