Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en" ng-app="domaci8">
  3. <head>
  4. <style>
  5. table {
  6. font-family: arial, sans-serif;
  7. border-collapse: collapse;
  8. width: 100%;
  9. }
  10.  
  11. td, th {
  12. border: 1px solid #dddddd;
  13. text-align: left;
  14. padding: 8px;
  15. }
  16.  
  17. tr:nth-child(even) {
  18. background-color: #dddddd;
  19. }
  20. </style>
  21. <meta charset="UTF-8">
  22. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
  23. <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-route.js"></script>
  24. <script type="text/javascript" src="main.js"></script>
  25. <title>Domaci 8</title>
  26. </head>
  27. <body>
  28. <div ng-controller="CtItem">
  29. <table>
  30. <tr>
  31. <th>Id</th>
  32. <th>Name</th>
  33. <th>Price</th>
  34. <th>Quantity</th>
  35. </tr>
  36. <tr ng-repeat="item in items">
  37. <td>{{item.id}}</td>
  38. <td>{{item.name}}</td>
  39. <td>{{item.price}}</td>
  40. <td>{{item.quantity}}</td>
  41. </tr>
  42. </table>
  43.  
  44. <br>
  45.  
  46. <form novalidate>
  47. <input type="number" ng-model="count">
  48. <br>
  49. <br>
  50. <button ng-click="nextTen()">Load</button>
  51. </form>
  52.  
  53. <br>
  54.  
  55. <form novalidate>
  56. <button ng-click="getItems()">Load all items</button>
  57. </form>
  58.  
  59. <br>
  60. <form novalidate>
  61. Name: <br> <input type="text" ng-model="item.name"> <br>
  62. Price: <br> <input type="number" ng-model="item.price"> <br>
  63. Quantity: <br> <input type="number" ng-model="item.quantity"> <br>
  64. <br>
  65. <button ng-click="addItem()">Add item</button>
  66. </form>
  67. <br>
  68. <form novalidate>
  69. <select ng-model="searchKey">
  70. <option value="name" selected="selected">Item name</option>
  71. <option value="price">Item price</option>
  72. </select>
  73. <br>
  74. <br>
  75. <input type="text" ng-model="searchParam">
  76. <br>
  77. <br>
  78. <button ng-click="searchItem()">Search item</button>
  79. </form>
  80. </div>
  81. <br>
  82. <div ng-controller="CtUser">
  83. <form novalidate>
  84. Username: <br> <input type="text" ng-model="userReg.username"> <br>
  85. Password: <br> <input type="password" ng-model="userReg.password"> <br>
  86. <br>
  87. <button ng-click="register()">Register</button>
  88. </form>
  89.  
  90. <p>{{msgReg}}</p>
  91.  
  92. <form novalidate>
  93. Username: <br> <input type="text" ng-model="userLog.username"> <br>
  94. Password: <br> <input type="password" ng-model="userLog.password"> <br>
  95. <br>
  96. <button ng-click="login()">Log In</button>
  97. </form>
  98.  
  99. <p>{{msgLog}}</p>
  100. </div>
  101. </body>
  102. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement