title: How can I call a method from html attribute in vue js
body: <p>I have a form and I need to call a method from a placeholder and also from other types of html attribute. </p>
  
  <p>Is there anyways I can call a vue method? 
  Here is what I am trying to do</p>
  
  <pre><code>&lt;input type="text" class="form-control" v-model="user.userName" 
   placeholder=t("un") required&gt; // want to call method t() from the placeholder
  </code></pre>
  
  <p>It seems this method cannot be called this way. Is there any other ways to achieve this? </p>
  
  <p>And my method is </p>
  
  <pre><code>methods: {
     t(key){
          console.log(key)
          var local='fr';
          return this.trans(key,local);
        }
  }
  </code></pre>