ng-switch on、ng-if/ng-show/ng-hide/ng-disabled标签
分支语句让你在界面上都可以写逻辑判断。
分支语句让你在界面上都可以写逻辑判断。
<ul> <li ng-repeat="person in persons"> <span ng-switch on="person.sex"> <span ng-switch-when="1">you are a boy</span> <span ng-switch-when="2">you are a girl</span> </span> <span ng-if="person.sex==1">you may be a father</span> <span ng-show="person.sex==2">you may be a mother</span> <span> please input your baby's name:<input type="text" ng-disabled="!person.hasBaby"/> </span> <span> </li> </ul>
很赞哦! ( 0
)
相关文章
- 第五天——范式路由之泛式路由分析
- 第五天——范式路由之泛式路由实现
- 第五天——范式路由之使用例子
- Node.js API实例讲解——node.js网络模块
- Node.js API实例讲解——数据的加密与解密
- HTML5 input Placeholder(占位符)样式
- Node.js API实例讲解——http.IncomingMessage
- FIS3 , 为你定制的前端工程构建工具
- Node.js API实例讲解——Buffer的写入方法
- Node.js API实例讲解——Socket 对象
- Node.js API实例讲解——创建http服务器
- Node.js API实例讲解——Buffer的静态方法