Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/assets/vue/components/systemannouncement/SystemAnnouncementCardList.vue

31 lines
604 B

<template>
<div
v-if="announcements.length > 0"
>
<SystemAnnouncementCard
v-for="announcement in announcements"
:key="announcement.id"
:announcement="announcement"
/>
</div>
</template>
<script setup>
import { ref } from "vue"
import axios from "axios"
import SystemAnnouncementCard from './SystemAnnouncementCard.vue';
const announcements = ref([]);
axios
.get("/news/list")
.then((response) => {
if (Array.isArray(response.data)) {
announcements.value = response.data;
}
})
.catch(function (error) {
console.log(error);
});
</script>