# Get the first character from a string

**URL:** <https://forum.ionicframework.com/t/get-the-first-character-from-a-string/133286>\
**Category:** ionic-v3\
**Created:** [June 21, 2018, 10:40am UTC](https://forum.ionicframework.com/t/get-the-first-character-from-a-string/133286 "2018-06-21T10:40:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajbasilio](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@rajbasilio](https://forum.ionicframework.com/u/rajbasilio)\
**Post date:** [June 21, 2018, 10:40am UTC](https://forum.ionicframework.com/t/get-the-first-character-from-a-string/133286/1 "2018-06-21T10:40:19Z")

</div>

This is my HTML file. In ion-text-avatar, I want to pass the first character of the app name.

```auto
<ion-list>
          <ion-item *ngFor="let app of apps">   
            <ion-avatar item-start ion-checkbox checked="true">
              <ion-text-avatar shape="round" class="avatar font">{{ }}
              </ion-text-avatar>
            <ion-icon name="checkmark-circle"></ion-icon>  
            </ion-avatar>
              <h6>{{ app }}</h6>
          </ion-item>
        </ion-list>

```

This is my ts code

`apps = [apple,banana,pineapple,grapes];`

In the ion-text-avatar, I want to display the first character apple, banana…etc

---

<div class="post-metadata">

**Author:** ![nirav\_ionic](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@nirav\_ionic](https://forum.ionicframework.com/u/nirav_ionic)\
**Post date:** [June 21, 2018, 10:43am UTC](https://forum.ionicframework.com/t/get-the-first-character-from-a-string/133286/2 "2018-06-21T10:43:21Z")

</div>

follow link [https://angular.io/api/common/SlicePipe](https://angular.io/api/common/SlicePipe)

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:31pm UTC](https://forum.ionicframework.com/t/get-the-first-character-from-a-string/133286/3 "2021-07-19T21:31:53Z")

</div>


