angular-ui / angular-ui/ui-scroll

Different uiScrollViewport schemes when using as a component

未关闭
#239 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
326
派生
104
PR 合并指标
30 天内没有已合并 PR

描述

I am trying to use great ui-scroll module inside one of the components. This is a (surprise!) list, but i need to show it both inside window (no viewport) or inside popup (with viewport).

The only way I know to tell ui-scroll about viewport is `ui-scroll-viewport` attribute. And the only way I can tell Angular about optional attribute is `ng-attr-` prefix. I want it to be optional attribute, since I hate to copy-paste the same code in ng-switches.

And this is a place when things get interesting. According to https://github.com/angular/angular.js/issues/16441 ui-scroll gets information about `ui-scroll-viewport` attribute before evaluation of `ng-attr-ui-scroll-viewport` value.

May be someone will point me to more "right" solution. But for now I had to patch ui-scroll.js file.

1) I send the `max-height` style inside some param to the component
```html

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。