Skip to content

Instantly share code, notes, and snippets.

@wayneseymour
Created April 9, 2014 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wayneseymour/10225125 to your computer and use it in GitHub Desktop.
Save wayneseymour/10225125 to your computer and use it in GitHub Desktop.
<!doctype html>
<html ng-app="myApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular.js"></script>
</head>
<body>
<div ng-controller="SomeCtrl">
{{ someProperty }}
<button ng-click="someAction()">Communicate</button>
</div>
<script>
angular.module('myApp', [])
.controller('SomeCtrl', function($scope) {
$scope.someProperty = 'hello computer';
$scope.someAction = function() {
$scope.someProperty = 'hello human';
};
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment