How can I pass prop to value of input with vue.js 2?

Viewed 7106

My vue component is like this :

<template>
    <div class="modal" tabindex="-1" role="dialog">
         <form method="post" :action="baseUrl+'/product/edit'">
            ...
            <input type="hidden" name="product_id" value="{{productId}}">
            ...
         </form>
    </div>
</template>

<script>
    export default {
        props:['productId'],
        ...
    }
</script>

There exist error like this :

value="{{productId}}": Interpolation inside attributes has been removed.

How can I solve this problem?

1 Answers
Related