I'm implementing the ng-clip using some tutorials. i'm doing it as it is in the tutorial but it's not working. i included Zeroclipboard.min.js, angular.js, ngClip.js
Html looks like..
<div ng-app="clip">
<button clip-copy="getTextToCopy()">Copy</button>
</div>
Script looks like..
angular.module('clip', ['ngClipboard']);
function Main($scope) {
$scope.getTextToCopy = function() {
return "ngClip is awesome!";
}
$scope.doSomething = function () {
console.log("NgClip...");
}
}
can anyone suggest me where i went wrong! Thanks.
I faced the same problem; the fix is to include the js files as shown below and Run the web page on server. Create a folder in tomcat>>webapps and paste the webpage there. Now view the page at url
The above code is running on tomcat.