ng-click
is meant for use with either a function in the current scope (so for example $scope.alert = window.alert
would solve the problem of not being able to alert there) or an angular expression. it looks like angular does not allow you to use global scope methods in there (it might be looking them up in the current $scope
, from which they are missing).