Skip to content

Commit

Permalink
Merge pull request #532 from Corfus/cdb/ivy-compatibility-fix
Browse files Browse the repository at this point in the history
ivy-compatability-patch
  • Loading branch information
cormacrelf committed Dec 11, 2019
2 parents f0327aa + 04f74fd commit f3ab684
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/core/src/dnd.directive.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
Injectable,
Directive,
ElementRef,
Input,
Expand All @@ -22,9 +21,11 @@ const explanation =
/**
* @ignore
*/
@Injectable()
export abstract class DndDirective {
protected abstract connection: any;
@Directive({
selector: '[abstractDndDirective]'
})
export class DndDirective {
protected connection: any;
private deferredRequest = new Subscription();
/** @ignore */
constructor(protected elRef: ElementRef, private zone: NgZone) { }
Expand All @@ -45,7 +46,10 @@ export abstract class DndDirective {
});
}
protected ngOnDestroy() { this.deferredRequest.unsubscribe(); }
protected abstract callHooks(conn: any): Subscription;
// @ts-ignore
protected callHooks(conn: any): Subscription {
return new Subscription();
}
}

// Note: the T | undefined everywhere is from https://github.com/angular/angular-cli/issues/2034
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/dnd.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {

import { SkyhookDndService } from './connector.service';
import {
DndDirective,
DragSourceDirective,
DropTargetDirective,
DragPreviewDirective
Expand Down Expand Up @@ -114,6 +115,7 @@ export interface BackendFactoryInput {

/** @ignore */
const EXPORTS = [
DndDirective,
DragSourceDirective,
DropTargetDirective,
DragPreviewDirective,
Expand Down

0 comments on commit f3ab684

Please sign in to comment.