Ich habe zwei Radiobuttons, zwei Textfelder und eine Schaltfläche.Angular JS: Sichtbarkeit sichtbar beim Klicken auf das Optionsfeld
Wenn ich auf die erste Schaltfläche klicke, sollte nur ein Textfeld angezeigt werden. Wenn ich auf die zweite Schaltfläche klicke, sollten zwei Textfelder erscheinen.
aber ich möchte es mit machen Sichtbarkeit: versteckte | sichtbare Eigenschaft, wie ich Button Position unter zwei Textfelder festgelegt werden soll.
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="form-group">
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-12 control-label">Registration</label>
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-12">
<div class="basic_info_radio_toggle">
<label class="one">
<input type="radio" name="registration_options" checked="checked" ng-click="option='one'" ng-init="option='one'">
<span>One</span></label>
<label class="two">
<input type="radio" name="registration_options" ng-click="option='two'">
<span>Two</span></label>
</div>
</div>
</div>
<div class="form-group" ng-show="option ==='two'">
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-12 control-label"></label>
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-12">
<form role="form">
<div class="form-group set_margin_0 set_padding_0">
<label>Button</label>
<input class="form-control" placeholder="Enter Button Name" type="text">
</div>
</form>
</div>
</div>
<div class="form-group" ng-show="option ==='two' || option === 'one'">
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-12 control-label"></label>
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-12">
<span>Link</span>
<input class="form-control" placeholder="http://" type="text">
</div>
</div>
<div class="form-group">
<div class="col-md-12 col-sm-12 col-xs-12 pull-right set_padding_0">
<button class="btn m-b-xs w-xs btn-danger common_btn set_margin_0">Save</button>
</div>
</div>
Danke.
könnten Sie eine Plunker erstellen, http://plnkr.co/edit – dreamweiver