This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor($mdCompilerProvider): remove deprecated $mdCompilerProvider.…
…respectPreAssignBindingsEnabled() - remove use of `$controller`'s private and unsupported third argument - this means that locals would only be available in a controller's `$onInit()` - update tests BREAKING CHANGE: The deprecated `$mdCompilerProvider.respectPreAssignBindingsEnabled()` API has been removed. We no longer respect AngularJS's `$compileProvider.preAssignBindingsEnabled()` value as this API was removed in AngularJS `1.7.0`. If you had the recommended configuration for AngularJS 1.6.x: ```js $compileProvider.preAssignBindingsEnabled(false); $mdCompilerProvider.respectPreAssignBindingsEnabled(true); ``` Then you should remove both of these calls as they are now the defaults in AngularJS `1.7.0` and AngularJS Material `1.2.0`. If you had the recommended configuration for AngularJS 1.7+: ```js $mdCompilerProvider.respectPreAssignBindingsEnabled(true); ``` Then you should remove this call as it is now the default in AngularJS Material `1.2.0`. If you were using a backwards-compatible configuration for AngularJS 1.6+: ```js $mdCompilerProvider.respectPreAssignBindingsEnabled(false); ``` Then you will need to remove this call and may need to refactor your Controllers for AngularJS Material components like `$mdDialog`, `$mdPanel`, `$mdToast`, or `$mdBottomSheet`. For example: ```js $mdDialog.show({ locals: { myVar: true }, controller: MyController, bindToController: true } function MyController() { // No locals from Angular Material are available. e.g myVar is undefined. // You would need to move anything accessing locals in here to $onInit(). } MyController.prototype.$onInit = function() { // Bindings are now available in the $onInit lifecycle hook. } ```
- Loading branch information
Showing
2 changed files
with
62 additions
and
363 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
Oops, something went wrong.