Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let store = {
- data: {
- //A remplacer par un appel au backend
- lists: {
- values: []
- },
- currentID: '',
- currentListName: '',
- currentPage: 'home',
- username: 'Aymeric',
- token: '12398434523879478124'
- },
- loadSingleList(id){ //Load the list corresponding to id given in parameter
- fetch(`http://localhost:4000/listwithitems/`+id, {
- headers: {Accept: 'application/json'}
- })
- .then(res => res.json()) // if (res.ok)
- .then(values => store.data.lists.values.push(values))
- .catch(err => console.log(err))
- },
- <div class="list">
- <h2 id="list_name">{{ lists.name }}</h2>
- <ol v-for="tab in lists.values">
- <li v-for="item in tab">{{ item.name }} <v-link class="delete" href="#">Supprimer</v-link></li>
- <br/>
- <br/>
- </ol>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement