We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e77980c commit 20409eaCopy full SHA for 20409ea
src/guide/migration-vue-router.md
@@ -530,20 +530,22 @@ data: function () {
530
},
531
watch: {
532
'$route': function () {
533
- this.isLoading = true
534
- this.fetchData().then(() => {
535
- this.isLoading = false
+ var self = this
+ self.isLoading = true
+ self.fetchData().then(function () {
536
+ self.isLoading = false
537
})
538
}
539
540
methods: {
541
fetchData: function () {
542
543
return axios.get('/api/posts')
544
.then(function (response) {
- this.posts = response.data.posts
545
+ self.posts = response.data.posts
546
547
.catch(function (error) {
- this.fetchError = error
548
+ self.fetchError = error
549
550
551
0 commit comments