{! l.user_name !} <span ng:hide="$position == 'last' ">,</span>
or using just an $index like this:
<span ng:hide="$index == 0">,</span> {! l.user_name !}
Looks much simpler now. You could also store the element count in
controller somewhere, so you would not have to recalculate it all over
again, or even better: create a method in controller which would
result true or false, so no calculation decisions would have to be
done in view.
Regards,
Witold Szczerba
> --
> You received this message because you are subscribed to the Google Groups "angular" group.
> To post to this group, send email to ang...@googlegroups.com.
> To unsubscribe from this group, send email to angular+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/angular?hl=en.
>
>
In that case you should submit a bug in a first place.
Thanks for pointing it out.
On Jul 2, 11:29 pm, Igor Minar <iimi...@gmail.com> wrote:
> why don't you just use {{ array.join(', ') }}?
>
> http://jsfiddle.net/IgorMinar/cksDH/1/
>
> /i
likes is a json object which I need to run through the predicate
function filter_workspace_answers() for filtering. Is it still
possible to apply join() then?
Luther
>
> On Sat, Jul 2, 2011 at 8:14 AM, Witold Szczerba <pljosh.m...@gmail.com>wrote:
>Seems that for an array of length 2, the 2nd position is 'middle', not
>
>
>
>
>
>
> > Hi,
> >http://docs.angularjs.org/#!/api/angular.widget.@ng:repeat
> > There is also $position available, so it can be written like this:
>
> > {! l.user_name !} <span ng:hide="$position == 'last' ">,</span>
>
'last'. This will cause a bug.