我有AuthenticationController
一个<div>
. 我试图打印{{ email }}
两次,但它只显示第二次。
<div class="login" ng-controller="AuthenticationController">
<!-- This DOESN'T show -->
{{ email }}
<div ng-switch on="isLoggedIn()">
<div ng-switch-when="true">
<input ng-click="logout()" type="submit" value="Logout">
</div>
<div ng-switch-when="false">
<!-- This IS shown -->
{{ email }}
<input ng-model="email" type="text">
<input ng-model="password" type="password">
<input ng-click="login()" type="submit" value="Login">
</div>
</div>
</div>
为什么第一个{{ email }}
不打印?