Angular WTF
by chenjy
HTML
<div ng-app="App" ng-controller="Ctrl">
<input type="text" ng-model="txtVal" />
<button ng-click="change()">Change</button>
<span ng-bind="txtVal"></span>
<button updater="txtVal">Fubar</button>
</div>
JavaScript
angular.module("App", []).controller("Ctrl", function($scope) {
$scope.change = function() {
$scope.txtVal++;
};
}).directive("myDir", function() {
return {
template:"",
restrict:"E"
};
});