Skip to content

Instantly share code, notes, and snippets.

@brianpetro
Last active August 18, 2016 16:59
Show Gist options
  • Save brianpetro/c0b1f2c98ef1d997acd5165bad86558b to your computer and use it in GitHub Desktop.
Save brianpetro/c0b1f2c98ef1d997acd5165bad86558b to your computer and use it in GitHub Desktop.
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app="myApp">
<div ng-controller="ctrl1">
<p>Input something in the input box:</p>
<p>Name :
<input type="text" ng-model="name" placeholder="Enter name here">
</p>
<h1>Hello {{name}}</h1>
</div>
</div>
<script>
angular.module('myApp', [])
.controller('ctrl1', function ($scope) {
$scope.name = "John Smith1";
});
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment