Created
November 8, 2018 10:48
-
-
Save spyl94/597f81bebc1cd61062902c6ae365ff25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app" class="App"> | |
<p class="my-component"> | |
Je suis mon premier composant | |
</p> | |
<ul> | |
<li v-for="todo in todos" :key="todo.id"> | |
{{ todo.name }} - {{ todo.dueDate.toLocaleString() }} | |
</li> | |
</ul> | |
</div> | |
</template> | |
<style lang="scss"> | |
#app { | |
font-family: "Avenir", Helvetica, Arial, sans-serif; | |
text-align: center; | |
color: #2c3e50; | |
} | |
</style> | |
<script> | |
export default { | |
name: "app", | |
data() { | |
return { | |
todos: [ | |
{ | |
id: 1, | |
name: "Todo 1", | |
dueDate: new Date() | |
}, | |
{ | |
id: 2, | |
name: "Todo 2", | |
dueDate: new Date() | |
}, | |
{ | |
id: 3, | |
name: "Todo 3", | |
dueDate: new Date() | |
}, | |
{ | |
id: 4, | |
name: "Todo 4", | |
dueDate: new Date() | |
} | |
] | |
}; | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment