[Vuejs]-Vue js reusing component twice in same page

2👍

Being the same component you need to distinguish them using a key property.

 <CardData key="news" uri="getNbNews" suffixe=" "  label="News" ></CardData>
 <CardData key="sources" uri="getNbSources" suffixe=" "  label="Sources"></CardData>

0👍

ok .. i missed this noob thing

self = this

to

const self = this 

coupled to @Cristiano Soleti :key param anwser solve the problem. thanks :).

Leave a comment