Online interview questions

Prepare interviews on Anything, AnyWhere

PHPSCOTS
PHPSCOTS
Blogger, Developer

On paste event in Angular 5

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);
}