Skip to content

Tag: javascript

How does vue watch sublist change or v-model

I try to watch a list that has sub list and some <input> can change the sublist well. when I modify the input,watcher doesn’t work Answer Do a deep watch in order to watch nested changes and trigger the watch: Interesting: If the nested data is any of the following, the watch will not fire without…

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