R
R
Rishat Sultanov2017-08-30 12:27:06
Web development
Rishat Sultanov, 2017-08-30 12:27:06

How to put data in placeholder using Vue.JS?

Good afternoon!
Help a little with the implementation of data entry in placeholder.
vue.js

<form class="center-form">
    <div class="form-group">
        <label for="exampleInputEmail1">{{ email }}</label>
        <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="{{ warning }}">
    </div>
    <div class="form-group">
        <label for="exampleInputPassword1">Password</label>
        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
    </div>
    <div class="form-check">
        <label class="form-check-label">
            <input type="checkbox" class="form-check-input">
            Check me out
        </label>
    </div>
    <button type="submit" class="btn btn-primary">Submit</button>
</form>
<script>
    new Vue({
        el: '.center-form',
        data: {
            email: "Ваш код",
            warning: "Укажите секретный код который Вам выдали."
        }
    })
</script>

[Vue warn]: Error compiling template:

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Koch, 2017-08-30
@rishatss

v-bind
:placeholder="warning"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question