The page in the browser is only blank and the following error appears in the console:
Failed to resolve directive: ref
After commenting and uncommenting various parts of my code, I discovered that the page only works right when I comment on this line:
<h3>{{ status }}</h3>
I'm using Vue.js 2. This status is computed:
computed: {
status: function(){
var count = 0;
var lista = this.$refs.listaComponent;
for(var i in lista.contas){
if (!lista.contas[i].pago) {
count++;
}
}
return !count ? "Nenhuma conta a pagar." : "Existem " + count + " contas a pagar.";
}
},
My HTML has this line:
<lista-component v-ref:lista-component></lista-component>