Can you add an example of infiniteScrollContainer
I tried using @elemenRef and @brainsiq viewChild and pass this elementRef to the @input()
html
div(class="mycontainer")
// container of the masonry
js
@ViewChild('mycontainer') mycontainer: ElementRef;
But it do not work.
If I passed a string, a string of what a css class ? for example if have a container .mycontainer and I pass infiniteScrollContainer=".mycontainer" or infiniteScrollContainer=".mycontainer"
But it do not work and I do not know how to fix.
I've also stumbled upon the lack of example on this case.
It turns out that you can use two methods.
1) In your component.html:
[infiniteScrollContainer]="selector"
and in your component.ts:
selector: string = '.mycontainer';
2) or if you don't want to use one more variable in your .ts file, you can just use single quotes inside double quotes:
[infiniteScrollContainer]="'.mycontainer'"
Also, if you want to point to an element that is outside the infiniteScroll directive you have to use [fromRoot]="true". Even though it is explained in the documentation, I had a hard time finding out what I was missing.
@ymatus nicely explained.
i havn't had the time to document this and others as much as i want to. it's on my todo list. please feel free to open a pr with your explanation.
cheer.s
closed by #206
Most helpful comment
I've also stumbled upon the lack of example on this case.
It turns out that you can use two methods.
1) In your component.html:
and in your component.ts:
2) or if you don't want to use one more variable in your .ts file, you can just use single quotes inside double quotes:
Also, if you want to point to an element that is outside the
infiniteScrolldirective you have to use[fromRoot]="true". Even though it is explained in the documentation, I had a hard time finding out what I was missing.