Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Chamada à métodos de uma classe ainda não carregada.
// Modelo
class Championship{
static ranking = []
static rounds = []
static new(){
Championship.ranking = TeamGenerator.generate()
return Championship
static first(){
return Championship.ranking.slice(0,10)
static last(){
return Championship.ranking.slice(10)
export default Championship
// Componente
<div class="ranking-table">
<RankingSection :teams="championship.first()" /> // Aqui acusa erro que o championship está undefined.
<RankingSection :teams="championship.last()" />
// Script do Componente
return {
championship: null
this.championship =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment