Reputation: 11
angular.element($window).bind('resize', function() {
$scope.$apply(function() {
$scope.hideConfig();
});
});
ReferenceError: $window is not defined
at new (tpsGridList.js:590)
at Object.invoke (angular.js:4182)
at $get.extend.instance (angular.js:8445)
Showing error while performing resizing event. Can anyone help to generate the resize event in angular js?
Upvotes: 1
Views: 65
Reputation: 3591
$window
is a service. If you want to apply this directive to window
just use
.directive('window', ...)
Upvotes: 1