forked from angular/angular.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($compile): multiple transclusion via named slots
Now you can efficiently split up and transclude content into specified places in a component's template. ```html <pane> <pane-title>Some content for slot A</pane-title> <pane-content>Some content for slot A</pane-content> </component> ``` ```js mod.directive('pane', function() { return { restrict: 'E', transclude: { paneTitle: '?titleSlot', paneContent: 'contentSlot' }, template: '<div class="pane">' + '<h1 ng-transclude="titleSlot"></h1>' + '<div ng-transclude="contentSlot"></div>' + '</div>' + }; }); ``` Closes angular#4357 Closes angular#12742 Closes angular#11736 Closes angular#12934
- Loading branch information
1 parent
40c974a
commit a4ada8b
Showing
3 changed files
with
421 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.