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 has been archived by the owner on Apr 12, 2024. It is now read-only.
In one of my directives, in the preLink function I manipulate the DOM (element itself) and its children and descendants.
I add attributes to child elements.
I remove some children and may be their children.
Later, in the compositeLinkFn, I get the above error.
I also noticed, that if I do the same thing (remove children) in the postLinkFn, I get no errors.
Question: Is this by design (not be able to remove the children in the preLink) or is this a bug. I thought, preLink was supposed to let you manipulate the DOM any way you want.
Is there a way, I can do whatever I want with the DOM before the real compile starts. Something like a preCompile which starts from parent. OR I think there should be a capturePhase compile which goes top-down. In this phase, the compiler would have no knowledge of any descendants and the DOM can be easily manipulated.
The text was updated successfully, but these errors were encountered:
Update 2: I cannot manipulate the DOM or child DOM if transclude = true. I still think, the directive should be able to manipulate the DOM before the link/compile phase.
In one of my directives, in the preLink function I manipulate the DOM (element itself) and its children and descendants.
Later, in the compositeLinkFn, I get the above error.
I also noticed, that if I do the same thing (remove children) in the postLinkFn, I get no errors.
Question: Is this by design (not be able to remove the children in the preLink) or is this a bug. I thought, preLink was supposed to let you manipulate the DOM any way you want.
Is there a way, I can do whatever I want with the DOM before the real compile starts. Something like a preCompile which starts from parent. OR I think there should be a capturePhase compile which goes top-down. In this phase, the compiler would have no knowledge of any descendants and the DOM can be easily manipulated.
The text was updated successfully, but these errors were encountered: