Last active
June 7, 2019 14:37
-
-
Save Alacrity01/4653bedcc7a0ac899d6744b5200d8e62 to your computer and use it in GitHub Desktop.
Week 7, Day 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<|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