You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
varmod=angular.module('test',[]);mod.directive('testParent',function(){return{template: '<p ng-transclude></p>',transclude: true,// replace: true, // Enable to see the issuecompile: function($tElement,$tAttr){return{pre: function($scope,$element,$attr){console.log('parent link pre');},post: function($scope,$element,$attr){console.log('parent link post');}};}};});mod.directive('testChild',function(){return{link: function($scope,$element,$attr){console.log('child link');}};});
When a directive has 'replace:true', all its child directives are linked (post!) before its pre-link is evaluated. This makes it impossible to rely on passing information between directives through element.data and element.inheritedData.