解決方法に関する詳細を共有してください。ログインボタンのユーザー名とパスワードをクリックするとログインとサインアップのボタンが表示されますが、ログインとサインアップボタンを非表示にします。ボタンをクリックした後にログインボタンを非表示にする方法
var app=angular.module('myApp',[]);
app.controller('myController',function($scope,myService){
$scope.resta={};
$scope.save=true;
$scope.redirect=function(){
}
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js"></script>
<body ng-app="myApp" ng-controller="myController" >
<div class="container" class="form-group" ng-show="login">
<label>Username:</label><input ng-model="username" class="form-control"
placeholder="Enter your username">
<label>Password:</label><input type="password" ng-model="password"
class="form-control" placeholder="Enter your password">
<button class="btn btn-primary" ng-click="redirect()" >Logging in</button>
</div>
<div class="container" class="form-group" ng-show="signup">
<label>Name:</label><input ng-model="resta.name" class="form-control"
placeholder="Enter your name">
<label>Mobile:</label><input ng-model="resta.mobile" class="form-control"
placeholder="Enter your number">
<label>EmailId:</label><input ng-model="resta.email" class="form-control"
placeholder="Enter your email">
<label>Password:</label><input ng-model="resta.password" class="form-
control"
placeholder="Enter your password">
<button class="btn btn-primary" ng-click="save()" >Registering</button>
</div>
<button ng-click="login=true" >Login</button>
<button ng-click="signup=true">SignUp</button>
</body>
それは動作します、ありがとう:) –
あなたは解決としてマークできますか? –
['$ scope'、]は動作しますか? –