Remove information from within an array with angle

0

I have an array with some information and it always comes with 4 numbers in front of the names:

 {id: 1810, name: "2652joaodasilva", username: "", password: ""}
 {id: 2744, name: "3704DiegoSerri", username: "", password: ""}

I would like to remove these 4 numbers, I tried in some ways with limitTo, but I only managed to cut it in other ways, I'm using ng-repeat to display them in a table:

  <tr ng-repeat="clientes in list_clients">
      <td class="text-center">{{clientes.name}}</td>
  </tr>
    
asked by anonymous 28.03.2018 / 21:27

1 answer

0

Using the limitTo filter is not possible, when limitTo is used for strings, it returns a string containing only the specified number of characters.

You can use the substring method:

{{clientes.name.substring(4, clientes.name.length)}}

or the method slice :

{{clientes.name.slice(4, clientes.name.length)}}
    
29.03.2018 / 09:50