Advertisement
Guest User

Untitled

a guest
Mar 5th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. var cs = angular.module('csw', []);
  2. cs.controller('login', ['$scope', function($rootScope, $scope, $http) {
  3. $scope.showLogin=true;
  4. $http.post('http://localhost:8080/csw/rest/cs/admin/login?userName=' + $scope.UserName + '&password=' + $scope.Password)
  5. }]);
  6.  
  7. <div ng-app="csw">
  8. <!-- login -->
  9. <div ng-controller="login" ng-show="showLogin" style="border: 2px solid black">
  10. <p>
  11. UserName: <input type="text" ng-model="UserName" value="admin">
  12. Password: <input type="text" ng-model="Password" value="1234">
  13. </p>
  14. <hr/>
  15. </div>
  16. </div>
  17.  
  18. cs.controller('login',['$scope', function($rootScope, $scope, $http) {
  19.  
  20. cs.controller('login',['$rootScope', '$scope', '$http', function($rootScope, $scope, $http) {
  21.  
  22. cs.controller('login', function($rootScope, $scope, $http) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement