<h1>Example: ngMouseenter / ngMouseover / ngMouseleave</h1>
<p>ngMouseenterはバブリングしないMouseoverイベント、ngMouseoverはMouseoverをリスナー登録します。</p>
<div ng-app="myApp">
  <div ng-controller="myController" ng-style="bubblingStyle">
    <p ng-mouseenter="mouseenter()" ng-mouseleave="mouseleave()" ng-style="myStyle" ng-class="'button'">Mouseenterするとフォントが太くなります。</p>
    <p ng-mouseover="mouseover()" ng-mouseleave="mouseleave()" ng-style="myStyle2" ng-class="'button'">Mouseoverするとフォントが太くなります。</p>
  </div>
</div>
@import "bourbon";

body {
  padding: 1.5rem;
}

.button {
  padding: .5em;
  border: 1px solid #ccc;
}
View Compiled
var app = angular.module('myApp', []);

app.controller('myController', ['$scope', function($scope){
  $scope.mouseenter = function(){
    $scope.myStyle = {
      fontWeight: 'bold'
    };
  }
  
  $scope.mouseover = function(){
    $scope.myStyle2 = {
      fontWeight: 'bold'
    };
  }
  
  $scope.mouseleave = function(){
    $scope.myStyle = {
      fontWeight: 'normal'
    }
    
    $scope.myStyle2 = {
      fontWeight: 'normal'
    }
  }
}]);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js