Posts

Showing posts with the label Vue js

Populate a drop-down in Vue.js and Asp.net Core from an ajax call

Image
  If you want to call a function on page load and Bind Drop down  List 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. Index . cshtml < div id ="apps">     < div class ="form-group">         < label class ="control-label"> State </ label >         < select v-model ="state" class ="form-control" v-on:change ="getcity($event)">             < option v-for ="state in States" : value ="state.stateId"> {{ state.stateName }} </ option >         </ select >     </ div >     < div class ="form-group">         &l