Thank you Luis for taking a time to create an example. It looks promising, 
however, is it possible to move wrapping element definition, i.e. 
<a href="...">
from directive's template to the main template of the application like in 
my example above? Obviously we will want to make this directive as 
universal as possible (to be used not only for links).

On Tuesday, October 27, 2015 at 3:51:22 PM UTC+3, Luís Loureiro wrote:
>
> 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