javascript - Clipboard in Angular Js -


i have csv content in angular 1 want copy clipboard. using clipboard.js https://github.com/zenorocha/clipboard.js if giving clipboard text button, getting copied.

<button class="btn" data-clipboard-text="gets copied"> copy clipboard</button> 

but if dynamically setting text below, nothing gets copied.

new clipboard('.btn', {     text: $scope.test; }); 

$scope.test has csv content

anything missing ?


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -