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

Commit 0137f47

Browse files
fix($compileProvider): remove the ability to set the restrict option on component() helper
1 parent 4e1b36c commit 0137f47

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/ng/compile.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -968,8 +968,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
968968
* See {@link ng.$compile#-bindtocontroller- `bindToController`}.
969969
* - `transclude` – `{boolean=}` – whether {@link $compile#transclusion content transclusion} is enabled.
970970
* Disabled by default.
971-
* - `restrict` - `{string=}` - a string containing one or more characters from {@link ng.$compile#-restrict- EACM},
972-
* which restricts the component to specific directive declaration style. If omitted, this defaults to 'E'.
973971
* - `$canActivate` – `{function()=}` – TBD.
974972
* - `$routeConfig` – `{object=}` – TBD.
975973
*
@@ -1077,7 +1075,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
10771075
transclude: options.transclude,
10781076
scope: {},
10791077
bindToController: options.bindings || {},
1080-
restrict: options.restrict || 'E'
1078+
restrict: 'E'
10811079
};
10821080
}
10831081

test/ng/compileSpec.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9357,8 +9357,7 @@ describe('$compile', function() {
93579357
template: 'abc',
93589358
templateUrl: 'def.html',
93599359
transclude: true,
9360-
bindings: {abc: '='},
9361-
restrict: 'EA'
9360+
bindings: {abc: '='}
93629361
});
93639362
module('my');
93649363
inject(function(myComponentDirective) {
@@ -9370,7 +9369,7 @@ describe('$compile', function() {
93709369
transclude: true,
93719370
scope: {},
93729371
bindToController: {abc: '='},
9373-
restrict: 'EA'
9372+
restrict: 'E'
93749373
}));
93759374
});
93769375
});

0 commit comments

Comments
 (0)