@s-molinari Thanks. That was the problem. The strangest thing was that I did that and saw no result. I may have not refreshed the screen or something.
W
Latest posts made by wmacklin
-
RE: How can I stop my data from looping when I call axios with a single id?
-
How can I stop my data from looping when I call axios with a single id?
This my script calling axios and a single id
<script> export default { data () { return { bid: [] } }, mounted () { this.getBid() }, methods: { getBid () { var bidId = this.$route.params.id this.$axios.get(`http://localhost:3000/bids/${bidId}`) .then((response) => { console.log(response) this.bid = response.data console.log(this.bid) }) .catch((error) => { console.log(error) }) } } } </script>
This my component to display the data. It displays several times despite their is only one item in the data.
<div v-for="bi in bid" :key="bi" > <div class="row bg-secondary lt-sm"> <q-toolbar> <q-toolbar-title class="text-caption"> {{bid.businessName}} <span class="text-grey">/</span> {{bid.bidname}} </q-toolbar-title> <q-btn flat class="float-right" color="primary" @click="$router.push('/editbiddetails')" > <q-icon color="accent" name="edit" style="font-size: 1.2em;"/> <div>Edit</div> </q-btn> </q-toolbar> </div> </div>
-
RE: How Can I Confiqure the Vue-Loader
@s-molinari Thanks. That was the key. I was able to fix my issue.
-
How Can I Confiqure the Vue-Loader
I am having trouble configuring the vue loader in the quasar.conf.js file. I am getting an error of:
UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was
not handled with .catch()This is my code:
const VueLoaderPlugin = require('vue-loader/lib/plugin') build: { scopeHoisting: true, extendWebpack (cfg) { cfg.module.rules.push({ enforce: 'pre', test: /\.(js|vue)$/, loader: 'eslint-loader', exclude: /node_modules/, options: { formatter: require('eslint').CLIEngine.getFormatter('stylish') } }) cfg.module.rules.push({ test: /\.vue$/, use: [ { loader: 'vue-loader', options: { transpileOptions: { transforms: { dangerousTaggedTemplateString: true } } } } ] }) cfg.plugins.push(new VueLoaderPlugin()) } },