|
@@ -23,7 +23,7 @@ export class Emitter {
|
|
|
this.emitter.on(name, handler);
|
|
this.emitter.on(name, handler);
|
|
|
|
|
|
|
|
if (scope) {
|
|
if (scope) {
|
|
|
- scope.$on('$destroy', function() {
|
|
|
|
|
|
|
+ scope.$on('$destroy', () => {
|
|
|
this.emitter.off(name, handler);
|
|
this.emitter.off(name, handler);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|