Answer the question
In order to leave comments, you need to log in
IE 11 - why is there an error in the method declaration?
In IE 11, this error appears:
Swears at the line with the handler function inside the watch function , which is inside the Vue application:
// v.1
watch: {
numbers: {
handler(val, oldVal) {
// some code
},
deep: true
}
}
// v.2
watch: {
numbers: function (val): {
// some code
}
}
Answer the question
In order to leave comments, you need to log in
IE doesn't understand methods , write as a property with a function.
watch: {
numbers: {
handler: function(val, oldVal) {
// some code
},
deep: true
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question