Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Get the first character from a string

$
0
0

@rajbasilio wrote:

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

<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

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>