VueJS Call Function on Page Load Example

VueJS Call Function on Page Load Example

In this Post We Will Explain About is VueJS Call Function on Page Load Example With Example and Demo.Welcome on – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to How to Call Vuejs Function on Page Load Example

In this post we will show you Best way to implement Vuejs call function after load, hear for How to trigger a method at page load in vuejs with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Vuejs Lifecycle Hooks

There are different Simple lifecycle hooks Vue provide:

How to call a vue.js function on page load

 //some source code....
     getUnits: function() {...}
 //some source code ......

///How to Call Vuejs Function on Page Load

vm=new Vue({
        this.liveGetData() //liveGetData will execute at pageload
              /* your logic */

Simple Structure of the VueJS Applications

// Initializing a create new VueJS instance
new Vue({
  // simple get Css selector id of parent some div
  el: '#liveApp',
  // initialize vuejs application specific area data
  data: {},
  // these vuejs function will simple run when the web- application loads 
  // generally like $(document).ready in jQuery like as a vuejs
  ready: function() {},
  // Other vuejs methods we'll use so in the webapplication
  methods: {}

How to Call Vuejs Function on Page Load Example

Include External Libs

    <link rel="stylesheet" href="">
    <script src=""></script>
    <script src="js/app.js"></script>


<!doctype html>
<html lang="en">
    <title>Getting Simple First started with vue.js</title>
    <div class="liveApp" id="liveApp">
        <div class="row">
            <h2> Vue.Js Example</h2>
            <div class="form-group">
                <label>Your monthly totalfees:</label>
                <input  type="number"  class="form-control"  placeholder="Enter your monthly totalfees..."  v-model="totalfees"  v-on="blur:showAlert" />
                <p class="help-block" v-if="totalfees">Your Annual totalfees:{{totalfees*12}}</p>



new Vue({
    el: '#liveApp', 
    data: {
        totalfees: 2500,
    ready: function() {
        console.log('Welcome- Vuejs initialized with totalfees 2500');
    methods: {
        showAlert: function() {
          alert("Mr/mss your Annual totalfees: "+this.totalfees * 12);

How to Call Vuejs Function on Page Load

Also Read This ๐Ÿ‘‰   Accessing Complex Nested JSON objects in VueJs

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example


I hope you have Got What is Vuejs call function before page load And how it works.I would Like to have FeedBack From My Blog( readers.Your Valuable FeedBack,Any Question,or any Comments about This Article( Are Most Always Welcome.