Online Interview Questions

Prepare interviews on Anything, AnyWhere

PHPSCOTS,Blogger, Developer Views: 8244

On paste event in Angular 5 ;
Usage

In view

<textarea name=”link” class=”form-control” required  (paste)=”pasteUrl($event.clipboardData.getData(‘text/plain’))”
[(ngModel)]=”model.link” #link=”ngModel”   placeholder=”Share a Link”></textarea>

In component

pasteUrl(e){
console.log(e);
}

Also Read Angular 2 interview questions

Leave a Reply

Your email address will not be published. Required fields are marked *