[CdkScrollable] Add more documentation and demo examples
i'm trying to put together the test of how to put a "scrollspy" together. but unfortunately i did not find any help in the documentation.
can you expect a user manual? thanks!
+1
+1
+1
I have implemented 3 possible ways on how to integrate CdkScrollable, non of which I feel follows best practices or optimization.
- Hardcoded handling of classes with 'nativeElement' (best one but dirty)
- Observable but updated with 'ngZone.run()' (Works but ngZone.run will trigger unnecessary events in the digest cycle, i.e. 'ObservableMedia')
- Observable but won't update until resize, 'drawer.toggle()' or other events are triggered (Cleanest one but will not function properly)
Can we please get a proper example/documentation that will follow best practices and be optimized?
监听滚动事件的时候,数据绑定是失效的。 此时比较折中的办法应该是 对 元素直接操作,代码触发angular 的数据视图更改可能会有潜在的风险。
Example with Sidenav https://stackoverflow.com/a/50812763/1071200
I'm struggling to implement the CdkScrollable feature. Please provide more examples. I'm following the example provided by Sebastian Denis in https://stackoverflow.com/a/50812763/1071200 but always get Data undefined.
wanted demo for scroll spy, anyone?