-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove the DragAndDropModule.forRoot method
BREAKING CHANGE: The `DragAndDropModule.forRoot` method was removed. To migrate just import the `DragAndDropModule` module directly
- Loading branch information
1 parent
cf1bc61
commit 5ae52a7
Showing
6 changed files
with
17 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
import { NgModule, ModuleWithProviders } from '@angular/core'; | ||
import { NgModule } from '@angular/core'; | ||
import { DraggableDirective } from './draggable.directive'; | ||
import { DroppableDirective } from './droppable.directive'; | ||
import { DraggableHelper } from './draggable-helper.provider'; | ||
|
||
@NgModule({ | ||
declarations: [DraggableDirective, DroppableDirective], | ||
exports: [DraggableDirective, DroppableDirective] | ||
}) | ||
export class DragAndDropModule { | ||
static forRoot(): ModuleWithProviders { | ||
return { | ||
ngModule: DragAndDropModule, | ||
providers: [DraggableHelper] | ||
}; | ||
} | ||
} | ||
export class DragAndDropModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
import { Subject } from 'rxjs'; | ||
import { Injectable } from '@angular/core'; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class DraggableHelper { | ||
currentDrag: Subject<any> = new Subject(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters