Hi,

I am trying to find out how to enable and disable directives on the fly, 
and recompiled based on the original DOM, controlled by an outer directive 
if this is possible, or controlled by anything else if its not. :)

*Static page input *
<div data-rootDirective="XYZ"...
   blabablalb
</div

Based on XYZ, the root directive, will wrap the transcluded DOM in certain 
"additional functionality"  by way of more directives,
*output*
<div class="rootDirective...
  <div class="directive1" ...
    <div class="directive2" ...
...
blablabla
</div>
Then the element is $compiled

This part is working great, but now I need to be able to dynamicaly 
enable/disable all the wrapping directives.
Then it gets tricky though, because the DOM should be recompiled based on 
the static/original content, not the output of the various directives that 
were previously compiled.


I am playing around a bit with linking/transclude functions right now, 
trying to get something working, but so far everything is a bit murky.

Anyone have a clean solution that keeps the logic isolated either to its 
own unit, or to the rootDirective only?

Thanks,
Brian

-- 
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/d/optout.

Reply via email to