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
refactor(core) ui-grid $parent scope is now automatically assigned to grid.appScope.
gridOptions.appScopeProvider can be used to assign anything to grid.appScope
BREAKING CHANGE: getExternalScopes() function is removed. Use grid.appScope instead.
external-scopes attribute is removed. Use gridOptions.appScopeProvider to assign values other than $scope.$parent to appScope
Copy file name to clipboardexpand all lines: 3.0_UPGRADE.md
+3-7
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ $scope.gridOptions = {
60
60
```
61
61
62
62
## ui-grid uses an isolate scope
63
-
You can no longer access data or functions directly on the parent scope. You can access a pre-defined scope by using getExternalScopes(), and set this scope using the external-scopes directive.
63
+
You can no longer access data or functions directly on the parent scope. You must use grid.appScope to get a reference to the parent scope
## Some features previously included in the base are now plugins.
103
99
104
100
Refer to the tutorials and API documentation at http://ui-grid.info/docs/ for more detail, an example provided below is column resizing. The plugins are available in the base javascript, using them requires only including the appropriate directive in the grid declaration:
In 2.x you would use `row.getProperty(col.field)` within a cellTemplate to get the value of a cell. In 3.0 this has changed to `grid.getCellValue(row, col)`.
89
89
90
90
91
-
### External scopes must be declared ###
91
+
### Grid now uses isolate scope ###
92
92
The grid now uses an isolate scope, meaning that the scope on your controller is not directly accessible
93
-
to widgets that you include in the grid. You now need to declare an external scope (refer associated tutorial).
93
+
to widgets that you include in the grid. You can get the parent scope used by the ui-grid element in any template
94
+
with the grid.appScope property. {{grid.appScope}}
0 commit comments