var text = "This is my text"; // your text you want to display
var text_arr = text.split(" ");// convert to array
getClicked(text_clicked){
alert(text_clicked); // or do something else with the text
}
html code => display your text with on-click event, something like below
<p><span *ngFor = "let myText as text_arr ; let i = index" (click)="getClicked({{ myText[i] }})"> {{ myText[i] }}</span></p>
I just created those chunks of code impromtu and haven’t checked it. Hope it helps.