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

feat($compile): set preAssignBindingsEnabled to false by default #15352

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
2 changes: 1 addition & 1 deletion src/ng/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
*
* The default value is true in Angular 1.5.x but will switch to false in Angular 1.6.x.
*/
var preAssignBindingsEnabled = true;
var preAssignBindingsEnabled = false;
this.preAssignBindingsEnabled = function(enabled) {
if (isDefined(enabled)) {
preAssignBindingsEnabled = enabled;
Expand Down
4 changes: 3 additions & 1 deletion test/ng/compileSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ describe('$compile', function() {

it('should allow preAssignBindingsEnabled to be configured', function() {
module(function($compileProvider) {
expect($compileProvider.preAssignBindingsEnabled()).toBe(true); // the default
expect($compileProvider.preAssignBindingsEnabled()).toBe(false); // the default
$compileProvider.preAssignBindingsEnabled(true);
expect($compileProvider.preAssignBindingsEnabled()).toBe(true);
$compileProvider.preAssignBindingsEnabled(false);
expect($compileProvider.preAssignBindingsEnabled()).toBe(false);
});
Expand Down