<!-- Plik: r04/simple-ng-model.html -->
<html ng-app="notesApp">
<head>
  <meta charset="utf-8">
  <title>Notes App</title>
</head>
<body ng-controller="MainCtrl as ctrl">

  <input type="text" ng-model="ctrl.username"/>
  Wpisałeś {{ctrl.username}}

<script
  src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.11/angular.js">
</script>
<script type="text/javascript">
  angular.module('notesApp', [])
    .controller('MainCtrl', [function() {
      this.username = 'nic';
    }]);
</script>
</body>
</html>
