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
+11-4
Original file line number
Diff line number
Diff line change
@@ -148,11 +148,11 @@ It is empty since it was deprecated in v1.6.0.
148
148
>{{item}}</div>
149
149
```
150
150
151
-
### Parametrs
151
+
### Parameters
152
152
153
153
***uiScroll – scroll expression** – The expression indicating how to enumerate a collection. Only one format is currently supported: `variable in datasource` – where variable is the user defined loop variable and datasource is the name of the data source to enumerate.
154
-
***buffer-size - expression**, optional - number of items requested from the datasource in a single request. The default is 10 and the minimal value is 3
155
-
***padding - expression**, optional - extra height added to the visible area for the purpose of determining when the items should be created/destroyed. The value is relative to the visible height of the area, the default is 0.5 and the minimal value is 0.3
154
+
***buffer-size - expression**, optional - number of items requested from the datasource in a single request. The default is 10 and the minimal value is 3.
155
+
***padding - expression**, optional - extra height added to the visible area for the purpose of determining when the items should be created/destroyed. The value is relative to the visible height of the area, the default is 0.5 and the minimal value is 0.3.
156
156
***start-index - expression**, optional - index of the first item to be requested from the datasource. The default is 1.
157
157
***adapter - assignable expression**, optional - if provided a reference to the adapter object for the scroller instance will be injected in the appropriate scope. If you have multiple scrollers within the same viewport, make sure that every one of them has its unique adapter name.
158
158
@@ -165,7 +165,14 @@ Some of the properties offered by the adapter can also be accessed directly from
165
165
166
166
The `expression` can be any angular expression (assignable expression where so specified). All expressions are evaluated once at the time when the scroller is initialized. Changes in the expression value after scroller initialization will have no impact on the scroller behavior.
167
167
168
-
The assignable expressions will be used by scroller to inject the requested value into the target scope. The scope associated with the viewport (the element marked with the [uiScrollViewport](#uiscrollviewport-directive) directive) will be used as the target scope. If the viewport is not defined (window viewport), the $rootScope will be used as the target scope. Also `Controller As` syntax could be used as an alternative way to specify target controller in assignable expressions.
168
+
The `assignable expressions` will be used by scroller to inject the requested value into the target scope.
169
+
The target scope is being defined in accordance with standard Angular rules (nested scopes and controller As syntax should be taken into account):
170
+
the scroller will traverse its parents (from the ui-scroll element's scope up to the $rootScope) to locate the target scope.
171
+
If the viewport is presented (the element marked with the [uiScrollViewport](#uiscrollviewport-directive) directive),
172
+
then the scope associated with the viewport will be a start point in target scope detecting.
173
+
Angular $parse service is being used in `assignable expressions` implementation.
174
+
175
+
_Deprecated!_ The format `expression on controller` introduced in v1.5.0 (and deprecated in v1.6.1) can be used to explicitly target the scope associated with the specified controller as the target scope for the injection. In this format `expression` is any angular assignable expression, and `controller` is the name of controller constructor function as specified in the `ng-controller` directive.
0 commit comments