AngularJS Example:
by psoares
HTML
<base href="https://polygit.org/polymer+v1.0.3/components/">
<link href="polymer/polymer.html" rel="import">
<!-- Load the Polymer.Element base class -->
<link rel="import" href="paper-input/paper-input.html">
<div ng-app="myApp">
<input type="text" onchange="console.log('standard onchange')"><span> This is a standard input. Onchange only triggers if the value changes and you navigate away.</span>
<div ng-controller="EventsDemoCtrl">
<paper-input value="{{theText}}"></paper-input> <span>ng-change is a custom event. It fires on every keystroke.</span>
<div>
{{theText}}
</div>
</div>
</div>
JavaScript
var myApp = angular.module('myApp',[]);
myApp.controller('EventsDemoCtrl', ['$scope', function($scope) {
$scope.theText = "hello";
$scope.onTextChange = function(e) {
console.log(arguments);
}
}]);