Comma Separated

angular

前端 未结 7 1119
清歌不尽
清歌不尽 2020-12-31 17:25

I have a pretty basic scenario (somewhat new to angular). I am trying to convert JSON:

[
    {\'name\': \'Nick\'},
    {\'name\': \'David\'},
    {\'name\':         


        
7条回答
  •  南笙
    南笙 (楼主)
    2020-12-31 18:08

    You could also accomplish that like this:

    {{name}}{{$last ? '' : ', '}}

    I used this approach on a similar issue I had, I try to never mix javascript/jquery and angular. Got the solution from here: Using comma as list separator with AngularJS

提交回复
热议问题