Pass input value to a model in VUE

0

I am working with vue, create a variant $ gate to be able to access the user's information in this way:

<input type="hidden" name="" id="valueid_profile" :value="$gate.idProfile()">

my question is how can I do to pass the value idProfile to a model?

gate class

export default class Gate{

    constructor(user){
        this.user = user;
        // console.log(user)
    }

    idProfile(){
        return this.user.id
    }

}

app.js

import Gate from './Gate.js';
Vue.prototype.$gate = new Gate(window.user);
    
asked by DoubleM 17.11.2018 в 18:18
source

0 answers