title: angularjs data binding not working on string variable?
body: <p>I have 2 versions of my code, one is not working and the other it is.
  My question is "why the not working one is not working?"
  here is the JSfiddle <a href="http://jsfiddle.net/fhjF7/" rel="nofollow">http://jsfiddle.net/fhjF7/</a></p>
  
  <p>The not working version:
  Controller:</p>
  
  <pre><code>function Ctrl($scope) {
      $scope.username = "username";
      $scope.users = [ "Matteo", "Marco", "Michele" ];
  };
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;h1&gt; Not working example&lt;/h1&gt;
  &lt;div ng-controller="Ctrl"&gt;
      &lt;div ng-repeat="user in users"&gt;
          &lt;input type="radio" ng-model="username" name="usern" ng-value="user" /&gt;
          &lt;strong&gt;{{user}}&lt;/strong&gt;
      &lt;/div&gt;
      &lt;div&gt;selected: {{username}}&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and here is the working one, which is almost identical but replacing the string variable with an object:
  Controller:</p>
  
  <pre><code>function usersCtrl($scope) {
      $scope.names = {username: "username"};
      $scope.users = [ "Matteo", "Marco", "Michele" ];
  };
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;h1&gt; Working example&lt;/h1&gt;
  &lt;div ng-controller="usersCtrl"&gt;
      &lt;div ng-repeat="user in users"&gt;
          &lt;input type="radio" ng-model="names.username" name="username" ng-value="user" /&gt;
          &lt;strong&gt;{{user}}&lt;/strong&gt;
       &lt;/div&gt;
       &lt;div&gt;selected: {{names.username}}&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>