Ng-Mouseenter-7

 

Ng-Mouseenter-7

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> </head> <body ng-app="app"> <div class="container"> <div class="row" ng-controller="myController"> <div class="col-md-2"></div> <div class="col-md-8 well"> <h3>Image Selected On Mouse Enter</h3> <div class="row"> <div class="col-md-4" style="margin-bottom:20px;" ng-repeat="img in images" ng-mouseenter="style={ 'border': '6px solid black' }" ng-mouseleave="style={}"> <img ng-style="style" style="height:150px;width:200px;" ng-src="{{img.path}}" /> </div> </div> </div> <div class="col-md-2"></div> </div> </div> <script> var app = angular.module("app", []); app.controller('myController', ['$scope', function ($scope) { $scope.images = [{ path: 'http://learnit.visrosoftware.com/datafiles/enter1.jpg' }, { path: 'http://learnit.visrosoftware.com/datafiles/enter2.jpg' }, { path: 'http://learnit.visrosoftware.com/datafiles/enter3.jpg' }, { path: 'http://learnit.visrosoftware.com/datafiles/enter4.jpg' }, { path: 'http://learnit.visrosoftware.com/datafiles/enter5.jpg' }, { path: 'http://learnit.visrosoftware.com/datafiles/enter6.jpg' }]; }]); </script> </body> </html>
Output