javascript - AngularJS: How to make parent directive using transclusion be compiled before the child directive? -


i have following structure:

<dad-dir>   <kid-dir></bar-dir>   <kid-dir></bar-dir> </dad-dir> 

here, daddir parent directive, , kiddir child directive. in daddir, transclude set true. output looks this:

<div class='dad-dir'>   <span class='kid-dir'>kid directive output</span>   <span class='kid-dir'>kid directive output</span> </div> 

the problem i'm having is, kiddirs being compiled / linked before daddir. problem because want daddir set attributes want kiddirs inherit. have console.log line in link functions of both daddir , kiddir , ones in kiddir logged before daddir's.

i have tried changing priority, setting daddir's priority 10 , kiddir's 1, has no effect.

any ideas?

i believe bug in angularjs version 1.0.5 using. upgraded 1.2 , magically, require: '^daddir' kiddir works.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -