projects/ngui-common/src/lib/ngui-inview/src/ngui-inview.component.ts
An element that listens to viewport positioning and fires inView and notInview events
selector | ngui-inview |
styles | :host {display: block;} |
template |
Properties |
Methods |
Inputs |
Outputs |
constructor(element: ElementRef, platformId: any)
|
|||||||||
Parameters :
|
blurEnabled | |
Type : boolean
|
|
Default value : true
|
|
Controls whether blur effect is applied to a component with less than 80% intersection ratio. Only applies when there are no "inview" event handlers defined. |
observerOptions | |
Type : IntersectionObserverInit
|
|
Default value : {threshold: [.1, .2, .3, .4, .5, .6, .7, .8]}
|
|
IntersectionObserver options |
options | |
Type : any
|
|
Deprecated config. Use |
inview | |
Type : EventEmitter<IntersectionObserverEntry>
|
|
notInview | |
Type : EventEmitter<IntersectionObserverEntry>
|
|
defaultInviewHandler | ||||
defaultInviewHandler(entry)
|
||||
default intersection handler, which sets blur dependes on intersection ratio this won't be invoked if user provides any (inview) event. e.g. (inview)="something()"
Parameters :
Returns :
any
|
handleIntersect | ||||
handleIntersect(entries)
|
||||
fires (inview) and (notInview) events when this component is visible or not visible
Parameters :
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
stop IntersectionObserver
Returns :
void
|
ngOnInit |
ngOnInit()
|
Starts IntersectionObserver
Returns :
void
|
isInview |
Default value : false
|
indicates that this element is in viewport |
observer |
Type : IntersectionObserver
|
once80PctVisible |
Default value : false
|
indicates that this element is 80% in viewport. Used by the default callback |
template |
Type : TemplateRef<any>
|
Decorators :
@ContentChild(TemplateRef, {static: true})
|
|