Vue JS call a function on load Example

By Hardik Savani | June 21, 2019 | Category : Vue.JS

If you want to call a function on page load in vue js then in this example i will show you how to trigger function on page load in vue js. we will run function on page load vue application.

we mostly require to call method on page load in our application. so you want to call function in vue.js app then you can do it using created option in vue js. So i will give full example so you can check it out.


<!DOCTYPE html>



<title>Vue JS call function on load Example -</title>

<script src=""></script>



<div id="app">

{{ message }}


<script type="text/javascript">

var app = new Vue({

el: '#app',

data: {

message: 'Hello Vue!'



myFunctionOnLoad: function() {

console.log('call on load...');



created: function(){







I hope it can help you...

Tags : Example Vue.JS

Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.

We are Recommending you: