Skip to content

Instantly share code, notes, and snippets.

@Alacrity01
Last active June 7, 2019 14:37
Show Gist options
  • Save Alacrity01/4653bedcc7a0ac899d6744b5200d8e62 to your computer and use it in GitHub Desktop.
Save Alacrity01/4653bedcc7a0ac899d6744b5200d8e62 to your computer and use it in GitHub Desktop.
Week 7, Day 4
<|terminal/cookbook_vue_app|>
npm install vue2-filters --save
<|RecipesIndex.vue|>
<script>
import Vue2Filters from 'vue2-filters';
var axios = require('axios');
data: function() {
return {
titleFilter: ""
...
methods: {},
mixins: [Vue2Filters.mixin]
};
(line 4)
<div>
Search by Title: <input v-model="titleFilter">
(line 6ish)
<div v-for="recipe in filterBy(recipes, titleFilter, 'title')">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment