From 5c0893d42447d4238677eddd12eb781ab6220adb Mon Sep 17 00:00:00 2001 From: Vladyslav Mashkin Date: Sun, 28 Aug 2016 14:10:22 +0300 Subject: [PATCH] Pass 'window.angular' instead of 'this.angular' The reason for this is to allow using this module with `webpack` module bundler. Webpack places module inside a function that's why `this` no longer pointing to Global Object and angular becomes `undefined`. --- src/ngRemoteValidate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ngRemoteValidate.js b/src/ngRemoteValidate.js index 8de9297..cdab3d9 100644 --- a/src/ngRemoteValidate.js +++ b/src/ngRemoteValidate.js @@ -171,4 +171,4 @@ .constant('MODULE_VERSION', '##_version_##') .directive( directiveId, [ '$http', '$timeout', '$q', remoteValidate ] ); -})( this.angular ); +})( window.angular );