-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rx): add directive which uses intersection-observer
- Loading branch information
1 parent
a71a0ff
commit 49647c6
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
libs/rx/platform/src/lib/directives/observe-intersection.directive.spec.ts
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {ObserveIntersectionDirective} from './observe-intersection.directive'; | ||
|
||
describe('ObserveIntersectionDirective', () => { | ||
it('should create an instance', () => { | ||
const directive = new ObserveIntersectionDirective(); | ||
expect(directive).toBeTruthy(); | ||
}); | ||
}); |
19 changes: 19 additions & 0 deletions
19
libs/rx/platform/src/lib/directives/observe-intersection.directive.ts
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {Directive, NgModule} from '@angular/core'; | ||
import {CommonModule} from '@angular/common'; | ||
|
||
@Directive({ | ||
selector: '[angularKitObserveIntersection]', | ||
}) | ||
export class ObserveIntersectionDirective { | ||
// todo | ||
// siehe angular-collection | ||
// evtl auch inview directive portieren | ||
constructor() {} | ||
} | ||
|
||
@NgModule({ | ||
imports: [CommonModule], | ||
declarations: [ObserveIntersectionDirective], | ||
exports: [ObserveIntersectionDirective], | ||
}) | ||
export class ObserveIntersectionDirectiveModule {} |