You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -20,16 +20,9 @@ Look [here](https://github.com/Hill30/NGScroller) for older versions.
20
20
###Description
21
21
22
22
The uiScroll directive is similar to the ngRepeat. Like the ngRepeat, uiScroll directive instantiates a template once per item from a collection.
23
-
Each template instance gets its own scope, where the given loop variable is set to the current collection item. The collection content is provided by
24
-
the datasource. The datasource name is specified in the scroll_expression. Starting with v 1.2.0 uiScroll supports animation.
23
+
Each template instance gets its own scope, where the given loop variable is set to the current collection item. The collection content is provided by the datasource. The datasource name is specified in the scroll_expression. Starting with v 1.2.0 uiScroll supports animation.
25
24
26
-
The viewport is an element representing the space where the items from the collection are to be shown. Unless specified explicitly with the
27
-
uiScrollViewport directive (see below), browser window will be used as viewport.
28
-
29
-
**Important: viewport height must be constrained.** The directive will stop asking the datasource for more elements only when it has enough
30
-
to fill out the viewport. If the height of the viewport is not constrained (style="height:auto") it will pull the entire content of the datasource
31
-
and may throw an Error depending on the number of items in the datasource. Even if it does not, using the directive this way does not provide any
32
-
advantages over using ng-repeat, because item template will be always instantiated for every item in the datasource.
25
+
One of the most important use cases for the directive is using it to build scrollable grids. There is no magic in doing it - all what's involved is putting together the HTML to be repeated and there are numerous ways to do it. It is a bit trickier if you want to give your user ability to adjust the grid (column widts, column order, etc.) as well as save/restore the adjustments. [uiScrollTd and uiScrollTh](#uiscrollth-and-uiscrolltd-directives) companion directives were created to simplify this task.
33
26
34
27
### Dependencies
35
28
@@ -59,9 +52,16 @@ If you plan to use ui-scroll over jQuery feel free to skip ui-scroll-jqlite.
59
52
Listing `ANY` for the tag, the directive can be applied to, stretches the truth - a little bit. The directive works well with majority of
60
53
the 'usual' tags - divs, spans, a, inputs, etc. For all of them the viewport should be a div (unless it is the window). Some other tags
61
54
require special treatment. If the repeated tag is a li, it is best to use ul or ol as a viewport. For a tr as a repeated tag the
62
-
viewport has to be the tbody.
55
+
viewport has to be the table or tbody.
63
56
dl as a repeated tag is not supported.
64
57
58
+
The viewport is an element representing the space where the items from the collection are to be shown. Unless specified explicitly with the [uiScrollViewport](#uiscrollviewport-directive) directive, browser window will be used as the viewport.
59
+
60
+
**Important: viewport height must be constrained.** The directive will stop asking the datasource for more elements only when it has enough
61
+
to fill out the viewport. If the height of the viewport is not constrained (style="height:auto") it will pull the entire content of the datasource
62
+
and may throw an Error depending on the number of items in the datasource. Even if it does not, using the directive this way does not provide any
63
+
advantages over using ng-repeat, because item template will be always instantiated for every item in the datasource.
0 commit comments