From 60ebd441268da2e425d1fc66512aafb56b1d0008 Mon Sep 17 00:00:00 2001 From: Dona278 Date: Wed, 14 Sep 2016 17:01:34 +0200 Subject: [PATCH] Replaced deprecated jquery functions (#2996) Since jQuery 3.0, both .bind() and .unbind() have been deprecated. The suggested replacements are: jquery.bind() => jquery.on() jquery.unbind() => jquery.off() --- src/ng1/directives/stateDirectives.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ng1/directives/stateDirectives.ts b/src/ng1/directives/stateDirectives.ts index 3c51e1bfb..122104b1f 100644 --- a/src/ng1/directives/stateDirectives.ts +++ b/src/ng1/directives/stateDirectives.ts @@ -181,9 +181,9 @@ function $StateRefDirective($state: StateService, $timeout: ITimeoutService) { if (!type.clickable) return; hookFn = clickHook(element, $state, $timeout, type, function() { return def; }); - element.bind("click", hookFn); + element.on("click", hookFn); scope.$on('$destroy', function() { - element.unbind("click", hookFn); + element.off("click", hookFn); }); } }; @@ -234,9 +234,9 @@ function $StateRefDynamicDirective($state: StateService, $timeout: ITimeoutServi if (!type.clickable) return; hookFn = clickHook(element, $state, $timeout, type, function() { return def; }); - element.bind("click", hookFn); + element.on("click", hookFn); scope.$on('$destroy', function() { - element.unbind("click", hookFn); + element.off("click", hookFn); }); } };