Angular事件
使用时通常为:ng-controller="ctrl"
代码及效果如下:
<body ng-app="app">
<ng-controller="ctrl">
<div class="box" ng-click="cl()" ng-mouseenter="mo()"></div>
<script src="script/angular.js"></script>
<script>
var myApp = angular.module("app",[]);
myApp.controller("ctrl",function($scope){
$scope.cl=function(){
console.log("click");
}
$scope.mo=function(){
alert("mouseenter");
}
})
</script>