I am using ng-clip using some tutorials. I do it like in the textbook, but it does not work. i included Zeroclipboard.min.js, angular.js, ngClip.js
The html looks like.
<div ng-app="clip"> <button clip-copy="getTextToCopy()">Copy</button> </div>
Script looks ..
angular.module('clip', ['ngClipboard']); function Main($scope) { $scope.getTextToCopy = function() { return "ngClip is awesome!"; } $scope.doSomething = function () { console.log("NgClip..."); } }
Can someone tell me where I was wrong! Thanks.
source share