This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("myapp", []) | |
.controller("MyController", function($scope) { | |
$scope.eventos = {}; | |
$scope.eventos.Clique = function() | |
{ | |
alert("evento clique"); | |
} | |
} ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script> | |
</head> | |
<body ng-app="myapp"> | |
<div ng-controller="MyController"> | |
<button ng-click="eventos.Clique()"> Clique aqui </button> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html > | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script> | |
</head> | |
<body ng-app="changeExample"> | |
<div ng-controller="ExampleController"> | |
<input type="checkbox" ng-model="confirmed" ng-change="eventos.change()" id="ng-change-example1"> CheckBox </input> | |
<br/> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('changeExample', []) | |
.controller('ExampleController', ['$scope', function($scope) { | |
$scope.eventos = {}; | |
$scope.eventos.change = function() { | |
alert("evento change disparado.") | |
}; | |
}]); |
OlderNewer