This commit is contained in:
vabene1111
2021-01-11 16:19:37 +01:00
parent cb913f6cea
commit 02aec7d6d6
16 changed files with 178 additions and 106 deletions

View File

@ -0,0 +1,49 @@
<template>
<div id="app">
<h1>Recipe View</h1>
{{ recipe }}
</div>
</template>
<script>
import Vue from 'vue'
import {BootstrapVue} from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import {makeToast} from "@/utils/utils.js";
Vue.use(BootstrapVue)
export default {
name: 'App',
components: {},
data() {
return {
recipe: undefined
}
},
mounted() {
makeToast("Error", "Error", "danger")
this.loadRecipe(5)
},
methods: {
loadRecipe: function (recipe_id) {
fetch(`/api/recipe/${recipe_id}`).then((response) => {
this.recipe = response.data;
}).catch((err) => {
console.log(err)
})
}
}
}
</script>
<style>
</style>