+1 vote
in Angular by
How will you get a substring from a string?

1 Answer

0 votes
by

slice filter is used to slice a piece of data from the input string.

In below example, we've added slice filter to an expression using pipe character. Here property value will be sliced based on the start and end positions.

<div> 

   The name of this Tutorial is {{TutorialName}}

  

   The first Topic is {{appList[0] | slice:1:2}}

 

   The second Topic is {{appList[1] | slice:1:3}}

 

   The third Topic is {{appList[2]| slice:2:3}}

 

</div> 

Related questions

+1 vote
asked Jan 24, 2022 in Angular by sharadyadav1986
0 votes
asked Jun 16, 2022 in MemCached by Robindeniel
...