CoffeeScript – Referencing DOM nodes in Angular expressions is disallowed

As the error states, Angular disallows accessing DOM nodes in expressions.

CoffeeScript uses an implicit return if none is specified.

This means that for example the function in your code will:

return element.dialog('open');

Angular will detect this and throw the error.

If you add an explicit return it should solve the issue: = =>
  return true

Leave a Comment