title: How to use JavaScript functions in Vue directives?
body: <p>Assume I have a JS function like this:</p>
  
  <pre><code>function myFunc()
  {
     return true;
  }
  </code></pre>
  
  <p>Now, I want to show an element if the output of is true:</p>
  
  <pre><code>&lt;p v-if="myFun()"&gt;I am Test&lt;/p&gt;
  </code></pre>
  
  <p>I know I can write this <code>myFunc</code> method inside Vue <code>methods</code> but I don't want this.</p>
  
  <p>Any idea would be great appreciated.</p>