JavaScript Error with v-bind in vue.js error with bind 10048,error bind eaddrinuse,error binding of

I try get data from my API server with axios but i get this error:

'v-bind' directives require an attribute value.

I dont know how i must use v-bind to fix it. Here is my code :

<template>
  <div class="main">
    <p class="title"><span>Fetured Items</span><br>
    <span>Shop for items based on what we featured in this week</span></p>
    <div v-if="products && products.length" class="content">
      <content-item v-for="product in products" :key="product.id"
      v-bind:name="product.name"
      v-bind:price="product.price"
       v-bind:srcToProdImage= 'localhost:8081/' + product.productImage></content-item>
    </div>
    <p class="cont-btn">
      <button class="btn">Browse All Product <span><i class="fas fa-arrow-right"></i></span></button>
    </p>
  </div>
</template>

<script>
import Content_item from './Content-item';
import axios from 'axios';

export default {
  data:{
    products,
    errors
  },
  created(){
    axios.get('localhost:8081/products')
    .then((result) => {
      this.products = result.data.products
    }).catch((err) => {
      this.errors.push(err)
    });
  },
  components: {
    'content-item' : Content_item
  }
}
</script>

<style lang="scss" scoped>
.content{
  display: flex;
  flex-wrap: wrap;
  margin-left: 150px;
  margin-right: 150px;
  justify-content: space-between;
}
.title{
  text-align: center;
  margin-top: 40px;
  margin-bottom: 30px;
  span:first-child{
    font-family: 'Lato', sans-serif;
    font-weight: 800;
    color: #222222;
    font-size: 30px;
  }
  span:last-child{
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    color: #9f9f9f;
    font-size: 14px;
  }
}
.cont-btn{
  display: flex;
  justify-content: center;
}
.btn{
  padding: 18px 24px 18px 24px;
  background-color: #f16d7f;
  font-family: 'Lato', sans-serif;
  font-weight: 800;
  border: none;
  outline: none;
  color: #ffffff;
}
</style>

Err: enter image description here

Answer:1

Just put double quotes around your srcToProntImage expression:

<content-item v-for="product in products" :key="product.id"
      v-bind:name="product.name"
      v-bind:price="product.price"
       v-bind:srcToProdImage="'localhost:8081/' + product.productImage"></content-item>
Answer:2

how to remove this jquery dialog and show it as a simple html form at the bottom of web page when clicked on button. I've a bootstrap table when i click on the add new record button it shows dialog ...

how to remove this jquery dialog and show it as a simple html form at the bottom of web page when clicked on button. I've a bootstrap table when i click on the add new record button it shows dialog ...

  1. remove jquery modal
  2. jquery remove modal backdrop
  3. jquery remove modal-backdrop fade in
  4. jquery remove modal from body
  5. jquery remove modal from dom
  6. jquery remove modal overlay
  7. jquery remove modal class
  8. jquery remove modal dialog
  9. jquery remove all modal
  10. jquery modal remove close button
  11. jquery modal remove x button
  12. jquery modal remove data
  13. jquery modal remove scrollbar
  14. jquery modal remove title bar
  15. jquery remove bootstrap modal

I'm confused by this line in my project: This id: categories-product belong to <select> and I've seen in project someone wrote this: And I'm wondering what this basically means ? $('#...

I'm confused by this line in my project: This id: categories-product belong to <select> and I've seen in project someone wrote this: And I'm wondering what this basically means ? $('#...

  1. what actually triggers labor
  2. what actually triggers labour
  3. what does triggered actually mean

I've tried to use this comparison statement and was almost sure that's gonna work, but it's not. Could you explain why ? let a = 1 a === ( 1 || 3 ) // true a === ( 3 || 1 ) // false Thanks for ...

I've tried to use this comparison statement and was almost sure that's gonna work, but it's not. Could you explain why ? let a = 1 a === ( 1 || 3 ) // true a === ( 3 || 1 ) // false Thanks for ...

I have the following html setup and cannot solve this issue. When a button in the html document gets clicked, an element <div id='wrapper'> <input id='fileUpload' name='fileUpload' ...

I have the following html setup and cannot solve this issue. When a button in the html document gets clicked, an element <div id='wrapper'> <input id='fileUpload' name='fileUpload' ...

  1. javascript call function later
  2. javascript run function later
  3. javascript execute function later
  4. javascript call function defined later