We'll see how we can use the mounted
property of the configuration object to fetch data for our applications. We will set initial props and then have these updated with the returned data from our HTTP call.
It would be great if a full URL was provided for the get to see it work locally. In the video the full URL is not visible.
Hey Philip! I've found the github url I believe you were asking for.
Sorry for the delay! Lucas is exactly right, that's the file in question. However, this url responds with raw json: https://raw.githubusercontent.com/doingandlearning/vue-fundamentals/main/data.json
Hope that's helpful and sorry it wasn't clearer on the video!
@Lucas @Kevin Thank you!! While it was clear what was going on in the lesson, it's still nice to see it in action locally ;)
Thanks everyone! If you use this: 'https://raw.githubusercontent.com/doingandlearning/vue-fundamentals/main/data.json' the data will come in response.data so:
axios.get('https://raw.githubusercontent.com/doingandlearning/vue-fundamentals/main/data.json').then( response => this.ticketTypes = response.data )
Hope someone find this useful :)