简体   繁体   English

活跃用户时的角度ng-show

[英]Angular ng-show when active user

I'm tried this tutorial https://github.com/maximepvrt/angular-google-gapi , and I was implementing google login with this plugin, but when I wanna to modification on header. 我已经尝试过本教程https://github.com/maximepvrt/angular-google-gapi ,并且我正在使用此插件实现google login,但是当我想对标头进行修改时。

Welcome, {{gdata.getUser().name}}! <a ng-click="logout()" ng-show="{{gdata.getUser().name}}" class="uppercase margin-left-10px">logout</a>

How to change logout to be login when user doesn't active ? 当用户不活跃时如何将注销更改为登录? Thanks before 之前感谢

<a ng-click="logout()" ng-show="gdata.getUser().name != null && gdata.getUser().name != ''" class="uppercase margin-left-10px">

ng-show is angular's directive. ng-show是angular的指令。 So you don't need to use {{}} inside this directive. 因此,您无需在此指令中使用{{}}。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM