Reason
If you are using Coffeescript, it is likely to be the culprit. Since Coffeescript always returns the value of the last expression, it may return DOM nodes:
# coffeescript
scope.focus = ->
element.focus()
# javascript
scope.focus = function() {
return element.focus(); // wheee
}
If you e.g. use this function like this, the error will be raised:
<span ng-click="focus()">...</span>
Solution Show archive.org snapshot
By adding an explicit return value (e.g. return false
), you can Coffeescript from returning a DOM node into Angular.
Posted by Dominik Schöler to makandra dev (2015-03-31 13:58)