title: passing a callback function to vue.js directive
body: <p>so i have a directive in vue.js which is pretty handy for having a single point that handles all request through out the app. you can view it at this gist</p>
  
  <p><a href="https://gist.github.com/jkirkby91-2/261fee5667efcf81648ab2a1a1c33c1b" rel="nofollow">https://gist.github.com/jkirkby91-2/261fee5667efcf81648ab2a1a1c33c1b</a></p>
  
  <p>but every form that uses this to process the request handles the response data completely different.</p>
  
  <p>so is it possible i can pass a call back function to the ajax directive to handle the response data.</p>
  
  <p>so for example i have a form that creates a new posts id like to pass a function that handles that response, i also have a search form that with the response data id like to handle to add markers to my map.</p>