Published On Jan. 21st 2016
Episode 16 • Run Time 21:29
Often, you'll find yourself in the position of wanting a form to submit asynchronously. Or, in other words, rather than performing a full post back to the server and refreshing the page, we'd rather opt for a simple AJAX request behind the scenes. Well at this point in your learning, you already know one way to hijack a form's submission, but what if we could instead create a reusable Vue directive to simplify things? What if we could simply add
v-ajax to a form tag, and have it automatically switch to using AJAX for its submission?
View the source for this lesson on GitHub.