As a courtesy to anyone who might stumble across this post. Here's my final
implementation:

<i ng-click="showHideGroup(row)"
   ng-class="getToggleIcon(row)"
   class="treeToggle"
   style="padding-left: {[{ getPadding(row) }]}px;">
</i>

I opted to use fontawesome icons instead of '+' / '-' / '.' as content
inside of a div. The logic and icon class definitions were moved out of the
template and into the getToggleIcon() function on scope.

William

*--*
*William Huster*
m1 | (202) 255-8444
m2 | (317) 709-3425


On Mon, Mar 17, 2014 at 3:43 PM, William Huster <[email protected]> wrote:

> Even better! This makes for even cleaner compiled DOM that doesn't have
> those ng-if comments.
>
> Thanks.
>
> On Monday, March 17, 2014 3:27:03 PM UTC-4, Sander Elias wrote:
>>
>> Hi,
>> You should really do this a whole lot more dry!
>>
>> <div ng-click="showHideGroup(row)"  style="padding-left: {[{ getPadding(row) 
>> }]}px;">
>>     {{ row.children ? row.expanded ? "-" : "+" : "." }}}
>> </div>`
>>
>> regards
>> Sander
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/W2MoRfpZEs0/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

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