Guest User

Untitled

a guest
Feb 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Vue.component("component", {
  2. template: template,
  3. data() {
  4. return {
  5. azaza: ["dasdsa"]
  6. }
  7. },
  8. created() {
  9. let url = '/url';
  10. console.log(this.azaza); // тут видит данные
  11. axios.get(url)
  12. .then(function (response) {
  13. console.log(this.azaza); // а тут уже не видит
  14. })
  15. .catch(function (error) {
  16. console.log(error);
  17. });
  18. }
  19. });
Add Comment
Please, Sign In to add comment