On paste event in Angular 5

devquora
devquora

Posted On: Dec 07, 2022

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

Also, Read the Angular 2 Interview Questions

    Please Login or Register to leave a response.

    Related Articles

    Angularjs Tutorials

    Angular 5 Modal dialog example

    Read how to add delete confirm box in Angular 4, Angular 5, Angular 6 modal dialog popup. In this article, we are going to see how to add a delete confirmation box in Angular Js we are using ngx-moda..

    Angularjs Tutorials

    Why Angular JS is one of the popular JavaScript frameworks

    Why Angular JS is one of the popular JavaScript frameworks. In this article read about the key features of Angular Framework. In the era of the online shopping, every fact wants to create their presen..

    Angularjs Tutorials

    Top 10 AngularJS Interview Questions for Experience

    In case you're searching for top 10 AngularJS Interview Questions online, look no further and dive straight into the basics that usually the panelists ask during an interview.Many corporates and M..