If I have a two computed properties like this,
computed: {
id: function(){ return this.$route.query.id; },
hasId: function(){ return this.$route.query.id !== undefined; }
}
how can I use id
to compute hasId
like this pseudo-code?
computed: {
id: function(){ return this.$route.query.id; },
hasId: function(){ return id !== undefined; }
}
return id
->return this.id()
fixes your problem