Skip to content

Tag: angularjs

Copy to clipboard javascript (no jQuery)

I have an Angular 9 app which I need to get a copy to clipboard of url copied when clicked. This is what I have so far: It copies but not on first attempt only on second attempt is it consoled. Then the clicks stack up so the third click it shows it was clicked 3 times. Why? What am

Separate Sort by table heading for different tables

In the following codepen I’m trying to sort by the column headers independently on two different tables. However, when I sort on any of the two tables it also sorts the columns of the other table. I tried creating a separate sort function called sortByB and using that on one of the tables but it still s…