Closed
Description
Vue.js version
2.0.2
The following code produces the following error on the console:
const app = new Vue({
el: '#app',
// template: '#app-template',
data: {
height: 0,
weight: 0,
},
// ....
});
app.$watch('weight + height', function () {
// do something
});
vue.js:2611[Vue warn]: Failed watching path: "weight + height" Watcher only accepts simple dot-delimited paths. For full control, use a function instead.
OTOH the documentation (https://vuejs.org/v2/api/#vm-watch) explicitely states that it's a valid syntax. It even has the same example.
Metadata
Metadata
Assignees
Labels
No labels