AngularJS ng-mouseenter
지시문
예시
마우스 커서가 <div> 요소에 들어갈 때 표현식을 실행합니다:
<div ng-mouseenter="count = count + 1" ng-init="count=0">Mouse over
me!</div>
<h1>{{count}}</h1>
정의 및 사용
이 ng-mouseenter
지시문은 AngularJS에 마우스 커서가 특정 HTML 요소에 들어갈 때 수행할 작업을 알려줍니다.
AngularJS 의 ng-mouseenter
지시문은 요소의 원래 onmouseenter 이벤트를 재정의하지 않고 둘 다 실행됩니다.
통사론
<element ng-mouseenter="expression"></element>
모든 HTML 요소에서 지원됩니다.
매개변수 값
Value | Description |
---|---|
expression | An expression to execute when the mouse cursor enters an element. |