Skip to content

Instantly share code, notes, and snippets.

@angelochen960
Created December 2, 2012 11:29
Show Gist options
  • Save angelochen960/4188293 to your computer and use it in GitHub Desktop.
Save angelochen960/4188293 to your computer and use it in GitHub Desktop.
AngularJS using [[]] as data binding symbols
<!doctype html>
<html ng-app="myApp">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<script type="text/javascript">
var myApp = angular.module('myApp', [], function ($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
});
</script>
</head>
<body>
<div>
<input type="text" ng-model="name" />
<hr>
<h1>Hello [[name]]!</h1>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment