AJAX call for products
Now that we've got Vue Resource in our project, we're ready to go ahead and make an AJAX call to our server and retrieve some proper poster objects.
In the onSubmit
function, we're now going to use Vue Resource to make a GET request.
Note that we can access Vue Resrouce from the context object as the property $http
.
So let's delete the console log and type this.$http.get()
to do a GET request.
onSubmit: function() {
this.$http.get();
}
Click to load comments...