Hi Slava!

I don't think this the best solution for your problem but maybe it helps.

Have you tried to use the transclude option of the directive?
You define a template for the wrapIf directive and then you decide if you 
want wrap it inside an anchor element or not.
You'll have to repeat code but at least is inside the directive!

Here's my example: http://jsfiddle.net/6Lk6wpev/1/

Regards,
*Luís Loureiro*

-- 
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