Skip to content
Advertisement

Tag: angularjs

Copy and Paste Table Using ContentEditable

This video is a good representation of the issue I am facing: https://drive.google.com/file/d/1jN44lUpnbVDv_m3LuPhlJl6RFUu884jz/view. I cannot copy and paste a table from another a tab without it breaking down. Because this uses local storage, here is a JSFiddle: https://jsfiddle.net/znj537w0/1/. Answer Use this: Change innerText to innerHTML. https://jsfiddle.net/3uvfjdew/

What is a good way to pass many parameters to controller?

I have an application on Java (Spring framework) and Javascript (AngularJs framework). There are list of objects in the table and two text fields for filtering this objects. Filtering happens on the server side so I pass these values from text fields to @RestController’s method as params and then to the repository method. Client side: Server side: It’s pretty easy

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 sorts the other table.

Rangy selection not working on Microsoft Edge

The below code snippet is working well for all browsers except Microsoft Edge. Is there anything we need to specifically add for Edge? Answer After a lot of research, came to solution that rangy.createHighlighter() without any parameters won’t work for Edge. You need to specify the “TextRange” additional parameter (see below). The default is “textContent”. Reference: https://github.com/timdown/rangy/wiki/Highlighter-Module

Advertisement