title: Pass Signed In user name to AngularJS controller using model binding
body: <p>I am trying to pass the signed in user name in the application to an angular controller. I am already passing other parameters using model-binding like this and works perfectly</p>
  
  <pre><code>&lt;input class="form-control" type="text" id="argOne" name="argOne" ng-model="viewModel.test.argumentOne" /&gt;
  </code></pre>
  
  <p>I tried passing the user name using a hidden input but I get an undefined value on the controller</p>
  
  <pre><code>&lt;input class="form-control" type="hidden" id="argTwo" name="argTwo" ng-model="viewModel.test.argumentTwo" value=@UserManager.GetUserName(User) /&gt;
  </code></pre>
  
  <p>I've seen similar examples here, but nothing specific when getting a value directly from the UserManager class from ASP.NET core</p>
  
  <p>Update: I am not asking how to display the Signed in user, the question is how can I pass that value to the angular controller using model binding like shown in the first line of code on the question, but with a hidden field or something similar that the user can't see</p>