title: Can't pass ViewBag data to AngularJS
body: <p>I have a controller:</p>
  
  <pre><code>public ActionResult Edit(int id) {
      ViewBag.IsComplete = false;
      return View(dbContext.Users.Where(user =&gt; user.Id == id))
  }
  </code></pre>
  
  <p>and the corresponding view:</p>
  
  <pre><code>@model User
  
  @{
      ViewBag.Title = "Edit User";
      Layout = "~/Views/Shared/_PopupLayout.cshtml";
  }
  
  &lt;p&gt;@ViewBag.IsComplete&lt;/p&gt;
  
  &lt;div ng-init="init(isComplete: @ViewBag.IsComplete)" /&gt;
  </code></pre>
  
  <p>The first instance of ViewBag.IsComplete (in the <code>&lt;p&gt;</code> tag) emits the correct value.  The second emits null.  Can anyone tell me what is going on here and how to fix it so the second @ViewBag.IsComplete emits the same as the first?</p>