-
Notifications
You must be signed in to change notification settings - Fork 27.4k
"Referencing the Window in Angular expressions is disallowed!" #4853
Comments
I guess we should use the $window service. http://docs.angularjs.org/api/ng.$window But i'm getting the same error with $window |
Put it in a controller function that you call from the expression in the
|
👍 For keeping calls like that out of a template. On Sun, Nov 10, 2013 at 10:40 AM, Pete Bacon Darwin <
|
Something like this
|
If you are using coffeescript it's a problem caused by coffeescript habit of returning everything and in your case returns a "dom" object. scope.foo = -> |
Ahh that's it, I did solve it but I couldn't figure out why, thanks On Friday, November 15, 2013, Adrian-Catalin Neatu wrote:
|
+1 @w3apps that's what I was doing. |
+1 @w3apps thank you so much! |
+1 @w3apps thank you! |
+1 @w3apps thanks, that solved my issue. |
awesome. thanks |
+1 w3apps |
👍 @w3apps |
@w3apps thx for the help! |
+1 @w3apps thank you! |
+1 Thanks! @w3apps |
+1 @w3apps |
@xtang 哈哈 我也遇到这个问题了 |
+1 Thanks! @w3apps |
+1 @w3apps |
The anwser of @w3apps was enough for me. |
+1 @w3apps |
Looking for an upvote on @w3apps answer, then remember I'm not on stackoverflow :) |
Looking for an upvote on @SergeyBukhman comment, then remembering I'm not on stackoverflow ... |
Thanks for all the upvotes on #4853 (comment) 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. |
Added here 05d3ed0 |
How do we do a
window.open
now?The text was updated successfully, but these errors were encountered: