On paste event in Angular 5

  • Posted by Sharad Jaiswal

    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

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..