diff --git a/src/loader.js b/src/loader.js index 62f13013e7fa..cda1bc7f766f 100644 --- a/src/loader.js +++ b/src/loader.js @@ -318,7 +318,7 @@ function setupModuleLoader(window) { * - `bindings` – `{object=}` – Define DOM attribute binding to component properties. * Component properties are always bound to the component controller and not to the scope. * - `transclude` – `{boolean=}` – Whether {@link $compile#transclusion transclusion} is enabled. - * Enabled by default. + * Disabled by default. * - `isolate` – `{boolean=}` – Whether the new scope is isolated. Isolated by default. * - `restrict` - `{string=}` - String of subset of {@link ng.$compile#-restrict- EACM} which * restricts the component to specific directive declaration style. If omitted, this defaults to 'E'. @@ -331,7 +331,7 @@ function setupModuleLoader(window) { * definitions are very simple and do not require the complexity behind defining directives. * Component definitions usually consist only of the template and the controller backing it. * In order to make the definition easier, components enforce best practices like controllerAs - * and default behaviors like scope isolation, restrict to elements and allow transclusion. + * and default behaviors like scope isolation, restrict to elements. * *
* Here are a few examples of how you would usually define components: @@ -420,7 +420,7 @@ function setupModuleLoader(window) { controllerAs: identifierForController(options.controller) || options.controllerAs || name, template: makeInjectable(template), templateUrl: makeInjectable(options.templateUrl), - transclude: options.transclude === undefined ? true : options.transclude, + transclude: options.transclude === undefined ? false : options.transclude, scope: options.isolate === false ? true : {}, bindToController: options.bindings || {}, restrict: options.restrict || 'E' diff --git a/test/loaderSpec.js b/test/loaderSpec.js index 3204cf27b4a0..21074c427223 100644 --- a/test/loaderSpec.js +++ b/test/loaderSpec.js @@ -121,7 +121,7 @@ describe('component', function() { controllerAs: 'myComponent', template: '', templateUrl: undefined, - transclude: true, + transclude: false, scope: {}, bindToController: {}, restrict: 'E' @@ -136,7 +136,7 @@ describe('component', function() { controllerAs: 'ctrl', template: 'abc', templateUrl: 'def.html', - transclude: false, + transclude: true, isolate: false, bindings: {abc: '='}, restrict: 'EA' @@ -148,7 +148,7 @@ describe('component', function() { controllerAs: 'ctrl', template: 'abc', templateUrl: 'def.html', - transclude: false, + transclude: true, scope: true, bindToController: {abc: '='}, restrict: 'EA'