This didnt quite work as repeaters hadn't been run in the list link, but 
something similar did:

The list-item link:

public link = ($scope: angular.IScope, $element: angular.IAugmentedJQuery) => {
    $element.wrap('<li></li>');

}

So each list-item deals with wrapping itself. 

Thanks for your help Sander

On Thursday, 21 January 2016 17:51:34 UTC+13, Kenese Lautusi wrote:
>
> Hi Sander,
>
> For now im just going add a line in the tg-list link that wraps the each 
> of the tg-list-item's before they are compiled:
>
> public link = ($scope: angular.IScope, $element: angular.IAugmentedJQuery) => 
> {
>     $element.find('tg-list-item').wrap('<li></li>');
>
> }
>    
> It is doing the job i want (ul > li > tg-list-item), and i don't think i 
> will have slowed things down too much (i was trying to avoid compiling 
> myself for that reason) but do you think this is a bad idea for any reason? 
> If not it is what ill stick with.
>
> Thanks for your help!
> Kenese
>
> On Wednesday, 20 January 2016 06:18:03 UTC+13, Sander Elias wrote:
>>
>> Hi Kenese,
>>
>> As an alternative you can build your own replace directive. There are 
>> some mayor pitfalls with it tough. (the core reason it's deprecated to 
>> begin with). If you know your code and use cases, it can be worked around. 
>> Not an easy task tough.  Part of the problem is, that the dom nodes you 
>> remove are holding the angular references you want to keep (this is put a 
>> bit simpler as it is..)
>>
>> 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to