Advertisement
Guest User

Untitled

a guest
Aug 4th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html ng-app="grocceryStore">
  3.  
  4. <head>
  5. <link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" />
  6. <link href="css/style.css" rel="stylesheet" />
  7. <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  8. <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.2/angular.js"></script>
  9. <script src="js/angular-ui.js"></script>
  10. <script src="js/app.js"></script>
  11. <script src="js/items.js"></script>
  12. <script src="js/product.js"></script>
  13. <script src="js/main.js"></script>
  14. </head>
  15. <style>
  16. body {
  17. background-color:#D4E6F1;
  18. }
  19. </style>
  20.  
  21. <body>
  22. <img src="http://i.imgur.com/wqfHrmJ.png?1" style= "display: block;
  23. margin-left: auto; margin-right: auto;"/>
  24. <div class="container-fluid" ng-controller="grocceryCtrl">
  25. <font color='#D68910'>
  26. <h1 class="header"> Mighty's Groceries </h1>
  27. <div ng-show="!login">
  28. <p align="center"><input type="text" placeholder="Enter Username" ng-model="Username" color="red" class="form-control" style="width: 500px;" /></p>
  29. <p align="center"><input type="password" placeholder="Enter Password" ng-model="Password" class="form-control" style="width: 500px;" /></p>
  30. <p align="center">
  31. <button class="btn btn-primary" ng-click = "checkLogin()">Login</button>
  32. </p>
  33. </div>
  34.  
  35. (function () {
  36. var secretEmptyKey = '[$empty$]'
  37.  
  38. app.controller('grocceryCtrl', function($scope) {
  39. $scope.selected = undefined;
  40. $scope.storeProductArray = storeProductArray;
  41. var maxNumProducts = 15;
  42. var discountAmt = 5;
  43. $scope.purchasedProductArray = [];
  44. $scope.totalAmt = 0;
  45. $scope.login = false;
  46.  
  47. $scope.checkLogin = function() {
  48. if($scope.username == "admin" && $scope.password == "admin") {
  49. alert("Login Successful!!");
  50. $scope.login = true;
  51. }
  52. else {
  53. alert("Invalid User name or Password")
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement