angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

"Referencing the Window in Angular expressions is disallowed!"

Open jpillora opened this issue 13 years ago • 26 comments

How do we do a window.open now?

Error: [$parse:isecwindow] Referencing the Window in Angular expressions is disallowed! Expression: foo()
  scope.foo = ->
    window.open 'https://example.com'

jpillora avatar Nov 09 '13 09:11 jpillora

The anwser of @w3apps was enough for me.

ghost avatar Mar 04 '15 02:03 ghost

+1 @w3apps

imdreamrunner avatar May 21 '15 03:05 imdreamrunner

Looking for an upvote on @w3apps answer, then remember I'm not on stackoverflow :)

SergeyBukhman avatar Oct 18 '15 08:10 SergeyBukhman

Looking for an upvote on @SergeyBukhman comment, then remembering I'm not on stackoverflow ...

ghost avatar Dec 15 '15 03:12 ghost

Thanks for all the upvotes on https://github.com/angular/angular.js/issues/4853#issuecomment-28491586 but I am locking this conversation as all these extra comments are actually diluting the ability to get access to that help.

I will add something to the API docs to cover this issue.

petebacondarwin avatar Dec 15 '15 10:12 petebacondarwin

Added here https://github.com/angular/angular.js/commit/05d3ed0d9bc71c8ee5329cfd87163a2d659fc9df

petebacondarwin avatar Dec 15 '15 10:12 petebacondarwin