AngularJS $event Object
AngularJS $event Object
$event함수를 호출 할 때 객체를 인수로 전달할 수 있습니다 .
$event객체는 브라우저의 이벤트 객체를 포함 :
예
<div ng-app="myApp" ng-controller="myCtrl">
<h1 ng-mousemove="myFunc($event)">Mouse Over Me!</h1>
<p>Coordinates: {{x + ', ' + y}}</p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.myFunc = function(myE) {
$scope.x = myE.clientX;
$scope.y = myE.clientY;
}
});
</script>
$event함수를 호출 할 때 객체를 인수로 전달할 수 있습니다 .
$event객체는 브라우저의 이벤트 객체를 포함 :
예
<div ng-app="myApp" ng-controller="myCtrl">
<h1 ng-mousemove="myFunc($event)">Mouse Over Me!</h1>
<p>Coordinates: {{x + ', ' + y}}</p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.myFunc = function(myE) {
$scope.x = myE.clientX;
$scope.y = myE.clientY;
}
});
</script>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 58 | jQuery Mobile | 8년 전 | 2979 | ||
| 57 | jQuery Mobile | 8년 전 | 2024 | ||
| 56 | jQuery Mobile | 8년 전 | 1353 | ||
| 55 | jQuery Mobile | 8년 전 | 1548 | ||
| 54 | jQuery Mobile | 8년 전 | 2230 | ||
| 53 | jQuery Mobile | 8년 전 | 1528 | ||
| 52 | jQuery Mobile | 8년 전 | 1551 | ||
| 51 | jQuery Mobile | 8년 전 | 1421 | ||
| 50 | jQuery Mobile | 8년 전 | 1310 | ||
| 49 | jQuery Mobile | 8년 전 | 1815 | ||
| 48 | jQuery Mobile | 8년 전 | 1458 | ||
| 47 | jQuery Mobile | 8년 전 | 2014 | ||
| 46 | jQuery Mobile | 8년 전 | 1976 | ||
| 45 | jQuery Mobile | 8년 전 | 1509 | ||
| 44 | jQuery Mobile | 8년 전 | 1670 | ||
| 43 | jQuery Mobile | 8년 전 | 1783 | ||
| 42 | jQuery Mobile | 8년 전 | 1661 | ||
| 41 | jQuery Mobile | 8년 전 | 1830 | ||
| 40 | jQuery Mobile | 8년 전 | 1468 | ||
| 39 | jQuery Mobile | 8년 전 | 1628 | ||
| 38 | jQuery Mobile | 8년 전 | 2176 | ||
| 37 | jQuery Mobile | 8년 전 | 2678 | ||
| 36 | jQuery Mobile | 8년 전 | 2126 | ||
| 35 | jQuery Mobile | 8년 전 | 1514 | ||
| 34 | jQuery Mobile | 8년 전 | 2417 | ||
| 33 | AngularJS | 8년 전 | 2861 | ||
| 32 | AngularJS | 8년 전 | 2426 | ||
| 31 | AngularJS | 8년 전 | 1761 | ||
| 30 | AngularJS | 8년 전 | 2836 | ||
| 29 | AngularJS | 8년 전 | 2391 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기