I\'m trying a demo on vuejs. Now I want the html title to bind a vm field.
The below is what I tried:
index.html
This answer is for vue 1.x
using requirejs.
define([
'https://cdn.jsdelivr.net/vue/latest/vue.js'
], function(Vue) {
var vm = new Vue({
el: 'html',
data: {
hello: 'Hello world'
}
});
});
{{ hello }}
{{ hello }}
you can do it like this using the ready function to set the initial value and watch to update when the data changes.
Replace Me
also i tried this based on your original code and it works
{{ title }}