angularjs - Clone transcluding content before any child directives execute -
I have displayed an instruction to use as an example for any other instruction. Here's an example:
& lt; One-Example & gt; & Lt; Input ng-model = "name" one-spell-check / & gt; & Lt; / One-Example & gt;
I want to copy it to markup that it has been placed inside and to show it to markup which
but adds the ng-model
input to the class, by creating it:
Instead, the example
should capture the command:
& lt; Input ng-model = "name" a-spellcheck / & gt;
However, before running internal instructions, I am unable to use transposed content. In the > ng- Model controller
, preLink
, and postLink
functions, there are already CSS classes with input
.
Does a director compile child instructions before
example
instruction? This is not possible because ngTransclude has a priority of 0 whereas ngModel's priority is 1 (the order of the compilation is less than the higher number). Thus ngModel will always be compiled before NgModel before it may be possible to change the preference of the command to compile, but will apply later
ngModel priority:
ngTransclude priority :
Comments
Post a Comment