Remove information from within an angled array

Asked

Viewed 50 times

0

I have an array with some information and that 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, tried some ways with limitTo, but only managed to cut 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>

1 answer

0


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

You can use the method substring:

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

or the method slice:

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.