Vue - v-bind directive for data binding

0 votes
529 views
added Nov 7, 2019 in Vue by LC Marshal Captain (25,790 points)
edited Nov 7, 2019 by LC Marshal
<!--href attributes-->
<div class="col-md-6">
    <a v-bind:href="propertyData.documents"><i class="icon-download ion-ios-download-outline"></i> Surveyor's Report</a>
 
<!--images-->
<a v-bind:href="propertyData.images">
<img v-bind:src="propertyData.images" width="144" height="96"></a>
</div>

 

3 Responses

0 votes
responded Nov 7, 2019 by LC Marshal Captain (25,790 points)
<!--use a v-bind for HTML attributes, simply because mustaches can't be use.-->
<div v-bind:id="dynamicId"></div>

 

0 votes
responded Nov 7, 2019 by LC Marshal Captain (25,790 points)
<!--v-bind works for boolean attributes too-->
<button v-bind:disabled="isButtonDisabled">Button</button>
<!--'dissabled' attribute will not include in the <button> if isButtonDisabled has null, undefined, or false value-->

 

0 votes
responded Nov 7, 2019 by LC Marshal Captain (25,790 points)
<!--fotorama-->
<div class="fotorama" data-nav="thumbs">
    <a v-for="img in images" :key="img" v-bind:href="img"><img :src="img" width="144" height="96"></a>
</div>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...