Hi, i understood,but as you can imagine this is not the real code i use,but it reproduce my bug. i use requirejs to load asynchronously directives before render. is there a way to modify my first directive to do it before ngIf compile,or to lock compile process the time to load directive,or to cleanup this 'snap-shot' ?
thank you for your explanations. Alexandre Le mardi 18 février 2014 13:09:04 UTC+1, Sander Elias a écrit : > > Hi, > > No, outside the ng-if the link function works as you would expect. > Inside is a different story. What happens is that during compile time the > ng-if takes a 'snap-shot' of your bbb directive, and stores it away. > then you come around and during link time you go an recompile stuff. that > is nice and all, but then comes the ng-if, and that puts back its > 'snap-shot'. And gone is your compilation. > Does this explain it a bit clearer? It's a oversimplified version of what > really happens. > If you need something like this, you can always put your aaa directive > inside your ng-if, or use ng-show. > > Regards > Sander > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.
