Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
  4.  
  5. <body ng-app="myApp" ng-controller="myCtrl">
  6. <table>
  7. <tr ng-mouseenter="mouseIn($event)" ng-mouseleave="mouseOut($event)" ng-repeat="x in records">
  8. <td>{{x}}</td>
  9. <td>
  10. <div class="editNucleo" ng-show="editNucleo">
  11. <input type="image" id="myimage" style="width:20px;" src="http://www.iconsdb.com/icons/download/green/edit-512.png" />
  12. </div>
  13. </td>
  14. </tr>
  15. </table>
  16. <script>
  17. var app = angular.module("myApp", []);
  18. app.controller("myCtrl", function($scope) {
  19. $scope.records = [
  20. "Alfreds Futterkiste",
  21. "Berglunds snabbköp",
  22. "Centro comercial Moctezuma",
  23. "Ernst Handel",
  24. ]
  25.  
  26. $scope.mouseIn = function (event) {
  27. $scope.editNucleo = true;
  28. }
  29.  
  30. $scope.mouseOut = function (event) {
  31. $scope.editNucleo = false;
  32. }
  33. });
  34. </script>
  35.  
  36. </body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement