ich ein Kind-Komponente haben, die diese Methode hat:Vue.js Zugang Elternkomponente
getSubscriptions() {
MessageService.subscriptions()
this.$parent.loading = true;
.then((data) => {
if (data.data.subscriptions == null) {
this.noSubscriptions = true;
} else {
this.subscriptions = data.data.subscriptions;
}
this.$parent.loading = false;
}).bind(this);
}
So möchte ich zeigen, einen Lastkreis in meinem Elternkomponente ich auf sie wie folgt aus:
this.$parent.loading
(Meine Eltern Komponente hat ein Datum Attribut namens loading
)
Aber wenn ich versuche, dass mit großem Schluck zu kompilieren^I erhalten:
012.351.[14:52:56] Starting 'browserify'...
46 | }
47 |
> 48 | t this.$parent.loading = false;
| ^
49 | }).bind(this);
50 | },
51 |
{ SyntaxError: unknown: Unexpected token (48:28)
46 | }
47 |
> 48 | t this.$parent.loading = false;
| ^
49 | }).bind(this);
50 | },
Was könnte hier falsch sein?
(Ich verwende Vue.js 1.0
)