title: Init data from Ajax Request Vue2
body: <pre><code>Vue.component('config_input', {
  
  template: '#config-input-template',
  
  data() {
      paterns: []
  },
  
  computed: {
      testData() {
          return this.paterns;
      }
  },
  
  mounted() {
      var self = this;
      axios.get('/listPatern').then(function (response) {
          self.paterns = response.data;
      }
  },
  
  });
  </code></pre>
  
  <p>In the console show testData is an empty array. It means that inside success ajax request function the 'paterns' value didn't update yet.
  Can anybody show me how to assign data response to 'paterns' value?</p>