EVOLUTION-MANAGER
Edit File: ngTransclude.html
<a href='https://github.com/angular/angular.js/edit/v1.3.x/src/ng/directive/ngTransclude.js?message=docs(ngTransclude)%3A%20describe%20your%20change...#L3' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit"> </i>Improve this Doc</a> <a href='https://github.com/angular/angular.js/tree/v1.3.9/src/ng/directive/ngTransclude.js#L3' class='view-source pull-right btn btn-primary'> <i class="glyphicon glyphicon-zoom-in"> </i>View Source </a> <header class="api-profile-header"> <h1 class="api-profile-header-heading">ngTransclude</h1> <ol class="api-profile-header-structure naked-list step-list"> <li> - directive in module <a href="api/ng">ng</a> </li> </ol> </header> <div class="api-profile-description"> <p>Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.</p> <p>Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.</p> </div> <div> <h2>Directive Info</h2> <ul> <li>This directive executes at priority level 0.</li> </ul> <h2 id="usage">Usage</h2> <div class="usage"> <ul> <li>as element: (This directive can be used as custom element, but be aware of <a href="guide/ie">IE restrictions</a>). <pre><code><ng-transclude> ... </ng-transclude></code></pre> </li> <li>as attribute: <pre><code><ANY> ... </ANY></code></pre> </li> <li>as CSS class: <pre><code><ANY class=""> ... </ANY></code></pre> </li> </div> <h2 id="example">Example</h2><p> <div> <a ng-click="openPlunkr('examples/example-example93')" class="btn pull-right"> <i class="glyphicon glyphicon-edit"> </i> Edit in Plunker</a> <div class="runnable-example" path="examples/example-example93" module="transcludeExample"> <div class="runnable-example-file" name="index.html" language="html" type="html"> <pre><code><script> angular.module('transcludeExample', []) .directive('pane', function(){ return { restrict: 'E', transclude: true, scope: { title:'@' }, template: '<div style="border: 1px solid black;">' + '<div style="background-color: gray">{{title}}</div>' + '<ng-transclude></ng-transclude>' + '</div>' }; }) .controller('ExampleController', ['$scope', function($scope) { $scope.title = 'Lorem Ipsum'; $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...'; }]); </script> <div ng-controller="ExampleController"> <input ng-model="title"> <br/> <textarea ng-model="text"></textarea> <br/> <pane title="{{title}}">{{text}}</pane> </div></code></pre> </div> <div class="runnable-example-file" name="protractor.js" type="protractor" language="js"> <pre><code>it('should have transcluded', function() { var titleElement = element(by.model('title')); titleElement.clear(); titleElement.sendKeys('TITLE'); var textElement = element(by.model('text')); textElement.clear(); textElement.sendKeys('TEXT'); expect(element(by.binding('title')).getText()).toEqual('TITLE'); expect(element(by.binding('text')).getText()).toEqual('TEXT'); });</code></pre> </div> <iframe class="runnable-example-frame" src="examples/example-example93/index.html" name="example-example93"></iframe> </div> </div> </p> </div>