From 5533c131c0f1adbfcc395ead20cb5b566063550a Mon Sep 17 00:00:00 2001 From: Anan Zhuang Date: Thu, 25 Aug 2022 09:20:04 -0700 Subject: [PATCH] [DeAngular][visualization][vislib] remove angular from vislib (#2138) * remove angular import and $scope from Binder class since there is no usage in the code Issue resolved: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2137 Signed-off-by: Anan Zhuang Signed-off-by: Anan Zhuang (cherry picked from commit 730a75a3b0515d2e827576a33323436f051bd3e0) --- src/plugins/vis_type_vislib/public/vislib/lib/binder.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/binder.ts b/src/plugins/vis_type_vislib/public/vislib/lib/binder.ts index 33ef39590d35..0dc7fbb6f537 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/binder.ts +++ b/src/plugins/vis_type_vislib/public/vislib/lib/binder.ts @@ -30,7 +30,6 @@ import d3 from 'd3'; import $ from 'jquery'; -import { IScope } from 'angular'; export interface Emitter { on: (...args: any[]) => void; @@ -42,13 +41,6 @@ export interface Emitter { export class Binder { private disposal: Array<() => void> = []; - constructor($scope: IScope) { - // support auto-binding to $scope objects - if ($scope) { - $scope.$on('$destroy', () => this.destroy()); - } - } - public on(emitter: Emitter, ...args: any[]) { const on = emitter.on || emitter.addListener; const off = emitter.off || emitter.removeListener;