angularJs中的ng-show指令
来源:互联网 发布:淘宝店铺客服不回话 编辑:程序博客网 时间:2024/06/05 03:45
单选框选定控制ng-show的显示和隐藏
ng-show="status==0" //ng-show里可以写表达式,该表达式意思是:status值为0的时候,该区域显示。
<!doctype html><html lang="en"><head> <meta charset="UTF-8"> <script src="angular.min.js"></script></head><body><div ng-app="module" ng-controller="ctrl"> 网站开启: <input type="radio" ng-model="status" ng-value="1"> 开启 <input type="radio" ng-model="status" ng-value="0"> 关闭 {{status}} <div ng-show="status==0"> <h2>关闭原因:</h2> <textarea>该网正在维护中,2:00可以访问</textarea> </div></div><script> var m = angular.module('module', []); m.controller('ctrl', ['$scope', function ($scope) { $scope.status=1; }]);</script></body></html>
效果图:
阅读全文
0 0
- angularJs中的ng-show指令
- AngularJS ng-show指令
- AngularJS之ng-show指令
- angularJs中的ng-click指令
- angularjs ng-show ng-hidden
- AngularJs -- ng-show
- ng-show,ng-hide,ng-if指令
- angularJs ng-show命令隐藏
- angularjs ng-show的用法
- AngularJS的ng-show标签
- AngularJS ng-cloak 指令
- AngularJS ng-model 指令
- AngularJS ng-model 指令
- AngularJS ng-checked指令
- AngularJS ng-model 指令
- AngularJS ng-list 指令
- AngularJS ng-open 指令
- AngularJs-指令<ng-**>
- linux上层app调用驱动底层的过程详解
- Centos7.3部署Elasticsearch5.4.0集群
- 手把手教你用Hexo+Github 搭建属于自己的博客
- [转]iOS开发系列--触摸事件、手势识别、摇晃事件、耳机线控
- FEI VSG
- angularJs中的ng-show指令
- 条款 34
- **js刷新页面方法大全**
- 一个杭州HR的国际招聘感悟
- [matlab]石头剪刀布
- 一个表单使用两个提交按钮
- HTML5+PHP 实现 保存文件夹相对路径 递归上传 在线浏览
- 两个window.onload = function(){}不全部加载
- 设计模式