-
Notifications
You must be signed in to change notification settings - Fork 851
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ngTableParams): remove backward compatibility shims
BREAKING CHANGE: 1) `ngTableAfterReloadData $scope` event removed Eventing no longer makes *direct* calls to `$scope.$emit`. Instead a strongly typed pub/sub service (`ngTableEventsChannel`) is used. **To migrate** *Previously:* ```js $scope.$on('ngTableAfterReloadData', yourHandler) ``` *Now:* ```js ngTableEventsChannel.onAfterReloadData(yourHandler, $scope) ``` 2) `$scope` removed from `NgTableParams` Because of 1. above, `NgTableParams` no longer requires a reference to `$scope`. A reference to `$scope` was largely an internal requirement so there should be no code change required on your part. 3) `getData` signature change The `$defer` paramater supplied to your `getData` method has been removed. Instead your `getData` method should return an array or a promise that resolves to an array. **To migrate** *Previously:* ```js var tp = new NgTableParams({}, { getData: getData }); function getData($defer, params){ // snip $defer.resolve(yourDataArray); } ``` *Now:* ```js var tp = new NgTableParams({}, { getData: getData }); function getData(params){ // snip return yourDataArrayOrPromise; } ``` 4) `ngTableParams` renamed to `NgTableParams` **To migrate** *Previously:* ```js var tp = new ngTableParams(); ``` *Now:* ```js var tp = new NgTableParams(); ```
- Loading branch information
1 parent
da06936
commit 9b81066
Showing
4 changed files
with
6 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters