I try to implement Perfect Scrollbar to my Angular 2 Application and use Angular 2 Perfect Scrollbar wrapper: https://github.com/zefoy/angular2-perfect-scrollbar If i have large content at application start moment my scrollbar appears and works normally. But if my content grows dynamically - scrollbar is not appear. I think I have to call the update() method of Scrollbar object when content is added. How can i call Perfect Scrollbar methods from Angular 2 components?
相关问题
- Angular RxJS mergeMap types
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- How to update placeholder text in ng2-smart-table?
- How to instantiate Http service in main.ts manuall
- Angular: ngc or tsc?
相关文章
- angular脚手架在ie9+下兼容问题
- angular 前端项目 build 报错 "Cannot find module 'le
- Angular Material Stepper causes mat-formfield to v
- After upgrade to Angular 9 cannot find variable in
- is there any difference between import { Observabl
- Suppress “Circular dependency detected” suppress w
- How can you get current positional information abo
- Angular material table not showing data
One can do it like this. First, insert perfect-scrollbar selector and give it a custom ID inside an HTML template:
Then in the typescript file refer to this element using defined ID and assign its type:
Finally, call update() method through directiveRef property of the Perfect Scrollbar component inside whatever method in the same file: