Answer the question
In order to leave comments, you need to log in
Why does not see id?
I have js file in script.
HTML
<div>
<script type="text/javascript">
window.onload = function () {
new Vue({
el: "#cheapestsites",
data: {
cheapsites: []
},
mounted(){
fetch("http://danya.loc/all.json").then(c => c.json()).then((data) => {
this.cheapsites = data;
})
}
});
new Vue({
src: "./all.json",
el: "#one",
data: {
short: "As a rule, most people prefer to buy gadgets at an early stage of the product's life cycle, so it remains NEW longer. Others prefer to buy a bit later, waiting for any early problems to be worked out. And everyone agrees that buying the right to a significant improvement will make you feel at least a little bitter, because Apple does not know how to signal the product's upgrade when it is sold."
}
})
}
</script>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question