<?
$aMenuLinks = Array(
Array(
"Каталог курсов",
"index.php",
Array(),
Array(),
""
),
Array(
"Мои курсы",
"mycourses.php",
Array(),
Array(),
""
),
);
echo json_encode($aMenuLinks);
?>
<div id="app2">
<div v-for="inform in info">
{{ inform }}
</div>
</div>
var app2 = new Vue ({
el: '#app2',
data() {
return {
info: null
};
},
mounted() {
axios
.get('test.php')
.then(response => (this.info = response.data));
}
})
[ "Каталог курсов", "index.php", [], [], "" ]
[ "Мои курсы", "mycourses.php", [], [], "" ]
<?
$aMenuLinks = Array(
Array(
"page"=>"Каталог курсов",
"link"=>"index.php",
"foo" => Array(),
"bar" => Array(),
"dollar"=> ""
),
Array(
"page"=>"Мои курсы",
"link"=>"mycourses.php",
"foo"=> Array(),
"bar" =>Array(),
"dollar" =>""
),
);
echo json_encode($aMenuLinks);
?>
<div id="app2">
<div v-for="inform in info">
<a v-bind:href="inform.link">{{inform.page}}</a>
</div>
var app2 = new Vue ({
el: '#app2',
data() {
return {
info: null
};
},
mounted() {
axios
.get('test.php')
.then(response => (this.info = response.data));
}
})