請分享我有關如何解決的詳細信息。我有兩個按鈕登錄和註冊點擊登錄按鈕時出現用戶名和密碼並提交按鈕,但我希望登錄和註冊按鈕隱藏。如何隱藏登錄按鈕後點擊按鈕
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',]工程?? –