Closed Butterblume654 closed 1 year ago
It works fine with strictTemplates
on, but you have to use ScrollbarAppearance
as the variable type!
This will get the same behavior with Material like in mat-card <mat-card [appearance]="appearance"></mat-card>
Hey, thanks. But this is not working. Also the other input properties like reachedOffset, autoHeightDisabled or autoWidthDisabled do not work.
They are accepting a primitive number or boolean/string type. And they do not work either. I mean, I can't even bind to [disabled] for some reason.
I also tried it with a fresh angular 15 project and I got the same error. But it works in an angular 16 project. But upgrading is not an option for me right now.
Those were fixed in v12.0.1 which was the last update before the upgrade to Angular 16, check the changelog
But it seems there is a problem between Angular 15 and strictTemplates
, because in Angular 16 it was fixed by itself, I did not change the code or anything! so I really don't what we can do about it!
That's strange. But okay, thanks for your help anyway. I appreciate it.
Until I'm able to update to angular 16 I access NgScrollbar with ViewChild and set then my props.
What are you trying to do?
I'm switching from perfect scrollbar to ngx scrollbar. Before I already had a facade for perfect scrollbar, so that I now only have one place to change. But it seems that the properties of ng-scroller are only accessible when used as attributes.
But I want to use variables to set e.g. autoHeightDisabled instead of hardcode its value to either true or fase. Same for appearance and some other properties. I always get "Can't bind to 'appearance' since it isn't a known property of 'ng-scrollbar'".
What troubleshooting steps have you tried?
I tried to use: <ng-scrollbar [appearance]="appearance"> <ng-scrollbar [attr.appearance]="appearance" >
I also tried many different versions of ngx-scrollbar.
Reproduction
Steps to reproduce:
Environment
EDIT
It works when I disable strictTemplates in my tsconfig. But I think it should also work with strictTemplates.