AngularJS Example:
by robcampo
HTML
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<div ng-app>
<h2>Test</h2>
<div ng-controller="TestCtrl">
<span ng-bind="subtotal">
I want this value to persist
</span
</div>
</div>
JavaScript
function TestCtrl($scope) {
console.log("TestCtrl $scope.subtotal: %o", $scope.subtotal);
}