ng-mouseover
Chỉ thị AngularJS
Thí dụ
Thực thi một biểu thức khi con trỏ chuột di chuyển qua phần tử <div>:
<div ng-mouseover="count = count + 1" ng-init="count=0">Mouse over
me!</div>
<h1>{{count}}</h1>
Định nghĩa và Cách sử dụng
Lệnh ng-mouseover
cho AngularJS biết phải làm gì khi con trỏ chuột di chuyển qua phần tử HTML cụ thể.
Chỉ ng-mouseover
thị từ AngularJS sẽ không ghi đè sự kiện onmouseover ban đầu của phần tử, cả hai sẽ được thực thi.
Cú pháp
<element ng-mouseover="expression"></element>
Được hỗ trợ bởi tất cả các phần tử HTML.
Giá trị tham số
Value | Description |
---|---|
expression | An expression to execute when the mouse cursor moves over an element. |