2
respostas

Uncaught SyntaxError: Unexpected indentifier

Quando tento chamar o view no console aparece um erro : "Uncaught SyntaxError: Unexpected indentifier"

class NegociacoesView {

    private _elemento: Element;

    constructor(seletor: string){
        this._elemento = document.querySelector(seletor);
    }

    update(): void {
        this._elemento.innerHTML = this.template();
    }

    template(): string {
        return 
        `
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th>DATA</th>
                        <th>QUANTIDADE</th>
                        <th>VALOR</th>
                        <th>VOLUME</th>
                    </tr>
                </thead>

                <tbody>
                </tbody>

                <tfoot>
                </tfoot>
            </table>               
        `;
    }
}
2 respostas

Já consegui resolver o erro, o problema era o arquivo.

Fala ai Isaias, tudo bem? Muito bom, sempre que precisar não deixe de criar suas dúvidas.

Abraços e bons estudos.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software