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.
I'm unable to access transcluded elements in a link function. The behavior has changed since 1.1.5. See http://plnkr.co/edit/WvGAlByx1771wurPbWXA?p=preview and compare the result with the commented 1.1.5 script
app.directive('test', [function () {
return {
restrict: 'E',
transclude: true,
replace: true,
template: '<div ng-transclude></div>',
link: function postLink(scope, element) {
// This should log 2 as in 1.1.5
console.log(element.children().length);
}
};
}]);
element.children(); should contain the transcluded elements like the `h2' tags:
I'm unable to access transcluded elements in a link function. The behavior has changed since 1.1.5. See http://plnkr.co/edit/WvGAlByx1771wurPbWXA?p=preview and compare the result with the commented 1.1.5 script
element.children();should contain the transcluded elements like the `h2' tags: