Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs($compile): update preAssignBindingsEnabled description #16162

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,8 @@ consolidating all the changes shown in the previous 1.6.0 release candidates.**
([bcd0d4](https://github.com/angular/angular.js/commit/bcd0d4d896d0dfdd988ff4f849c1d40366125858))**:

Previously, `$compileProvider.preAssignBindingsEnabled` was
set to true by default. This means bindings were pre-assigned in component
constructors. In Angular 1.5+ the place to put the initialization logic
set to true by default. This means bindings were pre-assigned in component/directive
controller constructors. In Angular 1.5+ the place to put the initialization logic
relying on bindings being present is the controller `$onInit` method.

To migrate follow the example below:
Expand Down
4 changes: 2 additions & 2 deletions docs/content/guide/migration.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ commits for more info.
- **$location** now uses `'!'` as the default hash-prefix for hash-bang URLs, instead of the empty
string. ([Details](guide/migration#commit-aa077e8))

- **$compile** will (by default) not pre-assign bindings on controller instances.
- **$compile** will (by default) not pre-assign bindings in component/directive controller constructors.
([Details](guide/migration#commit-bcd0d4))

- **http** imposes additional restrictions to **JSONP** requests for security reasons
Expand Down Expand Up @@ -412,7 +412,7 @@ if the option does not provide a value attribute.
<major />
<a name="commit-bcd0d4"></a>
**Due to [bcd0d4](https://github.com/angular/angular.js/commit/bcd0d4d896d0dfdd988ff4f849c1d40366125858)**,
pre-assigning bindings on controller instances is disabled by default. It is still possible to turn
pre-assigning bindings in component/directive controller constructors is disabled by default. It is still possible to turn
it back on, which should help during the migration. Pre-assigning bindings has been deprecated and
will be removed in a future version, so we strongly recommend migrating your applications to not
rely on it as soon as possible.
Expand Down