PHP Classes

File: frontend/js/paginas/evento.js

Recommend this page to a friend!
  Classes of Rodrigo Faustino   Micro-Blog   frontend/js/paginas/evento.js   Download  
File: frontend/js/paginas/evento.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: 714 bytes
 

Contents

Class file image Download
import { Carousel } from '../componentes/carousel.js'; export const Evento = { components: { Carousel }, template: ` <section> <h1>Eventos</h1> <Carousel /> <ul> <li v-for="evento in eventos" :key="evento.id"> <router-link :to="'/evento/' + evento.id">{{ evento.titulo }}</router-link> </li> </ul> </section> `, data() { return { eventos: [] }; }, inject: ['urlBase'], created() { fetch(`${this.urlBase}eventos`) .then(response => response.json()) .then(data => this.eventos = data); } };