Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (33 sloc) 697 Bytes
<div id="app">
<h1>Tasks - show</h1>
<hr />
<h1>title : {{ item.title }}</h1>
<div v-text="item.content"></div>
</div>
<!-- -->
<script>
new Vue({
el: '#app',
created () {
var id = "<%= params_id %>";
this.getItem(id)
},
data: {
// tasks: [],
item : [],
title:'',
content:''
},
methods: {
getItem: function(id) {
axios.get("/api/tasks_show/" + id )
.then(res => {
// res.data.result
var dat = res.data.result
this.item = dat;
console.log( dat )
})
}
}
});
</script>
You can’t perform that action at this time.