AngularJS - Simple Controller

HTML

<script src="http://code.angularjs.org/1.1.4/angular.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css">
<!-- This is the view -->
<div ng-app>
    <div ng-controller="FirstCtrl">
        <input type="text" ng-model="data.name">
       
    </div>
    <p>{{ data.name }}</p>
</div>

JavaScript

// This is the model
var data = { name: 'Initial Name' };

// This is the controller
function FirstCtrl($scope) {
    // $scope is not the model! model is everything in $scope
    $scope.data = data;
}