transclude - 編譯元素的内容,使它能夠被directive所用。需要(在模版中)配合ngtransclude使用(引用)
先看例子,index.js代碼:

var appmodule = angular.module('app', []);
appmodule.directive('hello', function() {
return {
restrict: 'e',
template: '<div>hi there <span ng-transclude></span></div>',
transclude: true
};
});
html

<html ng-app='app'>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body>
<hello>
<br/>
<span>原始的内容,</span><br/>
<span>還會在這裡。</span>
</hello>
</body>
<script type="text/javascript" src="../vendor/angular/angular.js"></script>
<script type="text/javascript" src="app/index.js"></script>
</html>
運作結果
firebug再看頁面代碼變成了

<div>hi there
<span ng-transclude="">
</span>
</div>
<hello <div="">hi there
</hello>