1
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?

1
  • Can you please show the whole directive / controller? Seems like you didn't inject $window. Commented May 19, 2015 at 9:56

1 Answer 1

1

$window is a service. If you want to apply this directive to window just use

.directive('window', ...)
Sign up to request clarification or add additional context in comments.

1 Comment

which method usable for resize listener event in angular.js

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.