यहाँ मेरी कोडTransclude लिंक समारोह में इंजेक्शन नहीं
है'use strict';
angular.module('app')
.directive('item'
, ["$timeout"
, "$Service"
, function(
$timeout
, $utils) {
return {
restrict: 'A',
scope: {
item: '=',
},
transclude: true,
link: function(scope, element, attrs, ctrl, transclude){
},
templateUrl: $fsUtils.getRelativeUrl('templates/item.html'),
controller: 'ItemCtrl',
};
}]);
मेरे index.html:
<item><div>Transcluded content.</div></item>
transclude चर undefined
है और ctrl चर proto__: Object
है। मुझे पारदर्शी दायरे में मूल दायरे को इंजेक्ट करने की आवश्यकता है। Transclude चर अपरिभाषित है। मुझसे कहां गलती हो रही है।
मेरा कोणीय संस्करण 1.1.5
धन्यवाद।
मैं 'item.html' देख सकते हैं? –