filter-app-vue-js | simple filtering app with vue js 🔥 🔥 🔥 | Learning library
kandi X-RAY | filter-app-vue-js Summary
kandi X-RAY | filter-app-vue-js Summary
This repo is for the tutorial of building a simple filtering app with vue js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of filter-app-vue-js
filter-app-vue-js Key Features
filter-app-vue-js Examples and Code Snippets
Community Discussions
Trending Discussions on filter-app-vue-js
QUESTION
I’ve been experimenting with vue.js and I'm having difficulty accessing JS object values in components when routing.
Using this repo to experiment, https://github.com/johnayeni/filter-app-vue-js, I'm just trying to replicate a basic a “product list” and “product description” app, but I can't get it working. The repo's homepage (the SearchPage.vue component) serves as the "product list," and I'm just trying to add the "product description" component to display only one item at a time.
I've added a "description page" component (calling it "item.vue") to allow a user to click on one of the languages/frameworks that will then route to item.vue to just display that specific object's associated information (item.name, item.logo, etc.), i.e., and not display any of the other languages.
Following some tutorials, here's what I've tried:
First, I added ids to the JS objects (found in data/data.js), i.e., id:'1'.
...ANSWER
Answered 2018-Aug-07 at 23:18The only reason you have access the id
because it's an url param: ./item/:id
.
You have a couple options here, which depends on what you're trying to accomplish:
As suggested by @dziraf, you can use vuex
to create a store, which in turn would give you access to all the data at any point in your app:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install filter-app-vue-js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page