Skip to content

Commit 957f7c7

Browse files
committed
Update README.md
1 parent 3abbff5 commit 957f7c7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,9 @@ Look [here](https://github.com/Hill30/NGScroller) for older versions.
2020
###Description
2121

2222
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.
2524

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.
3326

3427
### Dependencies
3528

@@ -59,9 +52,16 @@ If you plan to use ui-scroll over jQuery feel free to skip ui-scroll-jqlite.
5952
Listing `ANY` for the tag, the directive can be applied to, stretches the truth - a little bit. The directive works well with majority of
6053
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
6154
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.
6356
dl as a repeated tag is not supported.
6457

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.
64+
6565
###Directive info
6666
* This directive creates a new scope
6767
* This directive executes at priority level 1000

0 commit comments

Comments
 (0)