mirror of
https://github.com/vuejs/vue.git
synced 2024-11-22 04:39:46 +00:00
25 lines
555 B
HTML
25 lines
555 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title></title>
|
|
</head>
|
|
<body>
|
|
<script src="../../dist/vue.min.js"></script>
|
|
<script src="../../packages/server-renderer/basic.js"></script>
|
|
|
|
<div id="result">wtf</div>
|
|
|
|
<script>
|
|
var vm = new Vue({
|
|
data: { msg: 'foo' },
|
|
template: '<div>{{ msg }}</div>'
|
|
})
|
|
|
|
renderVueComponentToString(vm, function (err, result) {
|
|
document.getElementById('result').textContent = err && err.toString() || result
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|