这是一个链接:
<li ng-show="signedIn()"><a href="" data-toggle="modal" data-target="#postModal">Add prediction</a></li>
目前,它对于所有已登录的用户都是可见的,但我想使它仅对我可见(通过user.id,即989fc9a9-cc63-4c28-b308-6360b779d105或user.email,即[email protected] )。
我尝试了:ng-show="signedIn() && $scope.user.email == '[email protected]'"
,但这没有用:(
这是身份验证服务的源代码:https : //github.com/NiR-IT/tennispredictions/blob/master/scripts/services/Auth.js
我的应用程序:https : //sportpredictions.firebaseapp.com/#/
如果有人可以帮助我,我将不胜感激:)
我觉得你不需要$scope
那一点ng-show
。
ng-show="signedIn() && currentUser.email == '[email protected]'"
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句