1

I cant understand why, but my search field doesn't work with Vue.js correctly.

  • First of all, I need to hide search results if it's not available.
  • And my second problem is that I can't use variables where I need to.

P.S. Oh, I forgot, I need to delete space between div and 'li': sorry, I haven't access to post images because my reputation is low.
I'll put my code here: https://jsfiddle.net/4r2oqz2x/

  • I am really sorry for this kind of mapping, StackOverflow giving attention to jsfiddle link –  Jan 10 '18 at 18:01

1 Answers1

0

Your line

            <a href={{ searchResult.href }}><img src={{ searchResult.img }}>

should be

           <a :href="searchResult.href"><img :src="searchResult.img">

See How to solve Interpolation inside attributes has been removed. Use v-bind or the colon shorthand ? Vue.JS 2

Roy J
  • 42,522
  • 10
  • 78
  • 102