0

I have an Angular 2 form with a textarea field like

<div class="textarea-btn-holder form-group form-group-replace">
    <textarea autoGrow class="form-control text-comment" placeholder="Description" 
            name="description" [(ngModel)]="taskDescription" ></textarea>
</div>

I'm getting description from Rest API like

private taskDescription:string="Some data";

In some cases I get URL link as string, for example "https://......." So what I want is, if the string is hyperlink I want to make it as hyperlink and it should open in a new tab. And I want this hyperlink to be displayed inside textarea field only. How do I achieve this?

Protagonist
  • 1,559
  • 7
  • 33
  • 51

0 Answers0