This repository has been archived by the owner on May 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
39 additions
and
13 deletions.
There are no files selected for viewing
20 changes: 14 additions & 6 deletions
20
projects/intersection-observer/src/directives/intersection-observer.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
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
5 changes: 5 additions & 0 deletions
5
projects/intersection-observer/src/tokens/intersection-root-margin.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 |
---|---|---|
@@ -1,5 +1,10 @@ | ||
import {InjectionToken} from '@angular/core'; | ||
|
||
export const INTERSECTION_ROOT_MARGIN_DEFAULT = '0px 0px 0px 0px'; | ||
export const INTERSECTION_ROOT_MARGIN = new InjectionToken<string>( | ||
'rootMargin for IntersectionObserver', | ||
{ | ||
providedIn: 'root', | ||
factory: () => INTERSECTION_ROOT_MARGIN_DEFAULT, | ||
}, | ||
); |
5 changes: 5 additions & 0 deletions
5
projects/intersection-observer/src/tokens/intersection-threshold.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 |
---|---|---|
@@ -1,5 +1,10 @@ | ||
import {InjectionToken} from '@angular/core'; | ||
|
||
export const INTERSECTION_THRESHOLD_DEFAULT = 0; | ||
export const INTERSECTION_THRESHOLD = new InjectionToken<number | number[]>( | ||
'threshold for IntersectionObserver', | ||
{ | ||
providedIn: 'root', | ||
factory: () => INTERSECTION_THRESHOLD_DEFAULT, | ||
}, | ||
); |