Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<script src='https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.3/vue.js'></script>
<div id='app'>
  <div @click='upCountryForm()'>Click Me</div>
  <input v-model='upCountryName.country'> {{ upCountryName.country }}
</div>
 
const httpGet = function () {
  return Promise.resolve({
    data: {
      country: 'Some Country Name'
    }
  })
}
new Vue({
  el: '#app',
  data: {
    upCountryName: {}
  },
  methods: {
    upCountryForm () {
      httpGet().then(response => {
        this.upCountryName = response.data
      })
    }
  }
})
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers