JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-controller="DudeCtrl">
<input ng-model="model" ng-change="change()" />
<button ng-click="click()">Click!</button>
{{ stats }}
</div>
JavaScript
angular.module('app', []).controller('DudeCtrl', function($scope) {
$scope.stats = "";
$scope.$watch('model', function() {
$scope.stats += 'watch ';
});
$scope.change = function() {
//$scope.stats += 'change ';
$http.get("")
.success(function(name) {
//console.log("Your name is: " + name);
$scope.stats += 'change! ';
})
.error(function(response, status) {
console.log("The request failed with response " + response + " and status code " + status);
};
};
$scope.click = function() { $scope.model = 'lol'; };
});