AngularJs -- ng-show
来源:互联网 发布:极品飞车ol车辆数据 编辑:程序博客网 时间:2024/06/05 03:29
<!DOCTYPE html><html><head><meta charset="utf-8"><script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script></head><body><div ng-app="myApp" ng-controller="personCtrl"><button ng-click="toggle()">隐藏/显示</button><p>名: <input type=text ng-model="person.firstName"><br> 姓: <input type=text ng-model="person.lastName"><br><br></p><p ng-show="myVar"> 姓名: {{person.firstName + " " + person.lastName}}</p></div><script>var app = angular.module('myApp', []);app.controller('personCtrl', function($scope) {$scope.person = {firstName: "Zhang",lastName: "Ye"};$scope.myVar = true;$scope.toggle = function() {$scope.myVar = !$scope.myVar;};});</script></body></html>
ng-show和ng-hide差不多,
ng-show 指令可用于设置应用中的一部分是否可见 。
ng-show="false" 可以设置 HTML 元素不可见。
ng-show="true" 可以以设置 HTML 元素可见。
ng-hide正好相反,仅此而已
0 0
- angularjs ng-show ng-hidden
- AngularJs -- ng-show
- AngularJS ng-show指令
- angularJs ng-show命令隐藏
- AngularJS之ng-show指令
- angularjs ng-show的用法
- AngularJS的ng-show标签
- angularJs中的ng-show指令
- React实现Angularjs ng-show、ng-if和ng-hide
- angularjs ng-if ng-show ng-hide区别
- AngularJS – Conditional Display using ng-show / ng-hide, ng-if, ng-include, ng-switch
- AngularJS 用ng-show来绑定ng-model
- angularjs中关于ng-show和ng-switch
- AngularJs ng-show 和 ng-if的区别
- AngularJS的学习--ng-show/ng-hide/ng-if和ng-switch
- AngularJS的学习--ng-show/ng-hide/ng-if和ng-switch
- angularJs中ng-if,ng-show,ng-disabled,ng-init使用案例
- angularjs中ng-show和css中display的区别
- Html 显示图片流
- fastcgi介绍
- 实现堆栈中最小的元素getMin()
- EXTJS4.2.1学习(二)
- Linux/UNIX 定时任务 cron 详解
- AngularJs -- ng-show
- Android用浏览器打开pdf文件
- ionic2 cordova插件用法之二
- linkedList和ArrayList的比较
- 设计中的版面艺术!你造吗?(三)
- 获取一个event_base
- MongoDB 学习
- compile中的force = true
- LRU缓存实现