Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
- <body ng-app="myApp" ng-controller="myCtrl">
- <table>
- <tr ng-mouseenter="mouseIn($event)" ng-mouseleave="mouseOut($event)" ng-repeat="x in records">
- <td>{{x}}</td>
- <td>
- <div class="editNucleo" ng-show="editNucleo">
- <input type="image" id="myimage" style="width:20px;" src="http://www.iconsdb.com/icons/download/green/edit-512.png" />
- </div>
- </td>
- </tr>
- </table>
- <script>
- var app = angular.module("myApp", []);
- app.controller("myCtrl", function($scope) {
- $scope.records = [
- "Alfreds Futterkiste",
- "Berglunds snabbköp",
- "Centro comercial Moctezuma",
- "Ernst Handel",
- ]
- $scope.mouseIn = function (event) {
- $scope.editNucleo = true;
- }
- $scope.mouseOut = function (event) {
- $scope.editNucleo = false;
- }
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement