Default Checkbox checked and Component Visible ased on selection:
------------------------------------------------------------------
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="style.css" />
<script data-require="angular.js@1.3.x" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.7/angular.js" data-semver="1.3.7"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<p>Hello {{name}}!</p>
<input type="checkbox" ng-model="checkBoxValue" ng-init="checkBoxValue=true" id="myonoffswitch7"/>
<div ng-show="checkBoxValue">
<span class="teamsize">
<label>Team Size</label><input type="text" />
</span>
</div>
</body>
</html>
------------------------------------------------------------------
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="style.css" />
<script data-require="angular.js@1.3.x" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.7/angular.js" data-semver="1.3.7"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<p>Hello {{name}}!</p>
<input type="checkbox" ng-model="checkBoxValue" ng-init="checkBoxValue=true" id="myonoffswitch7"/>
<div ng-show="checkBoxValue">
<span class="teamsize">
<label>Team Size</label><input type="text" />
</span>
</div>
</body>
</html>
No comments:
Post a Comment