PHP Classes

File: frontend/js/subPagina/eventoDetalhes.js

Recommend this page to a friend!
  Classes of Rodrigo Faustino   Micro-Blog   frontend/js/subPagina/eventoDetalhes.js   Download  
File: frontend/js/subPagina/eventoDetalhes.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Micro-Blog
Blog management system extensible with classes
Author: By
Last change:
Date: 2 days ago
Size: 604 bytes
 

Contents

Class file image Download
export const EventoDetalhes = { template: ` <section v-if="evento"> <h1>{{ evento.titulo }}</h1> <p>{{ evento.descricao_breve }}</p> <div>{{ evento.conteudo }}</div> </section> `, data() { return { evento: null }; }, inject: ['urlBase'], created() { const id = this.$route.params.id; fetch(`${this.urlBase}eventos`) .then(response => response.json()) .then(data => { this.evento = data.find(evento => evento.id == id); }); } };