Advertisement
Guest User

Untitled

a guest
Feb 5th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>AngularJS Example</title>
  5. <style>
  6. body {
  7. background-color: #ddf;
  8. font: 16px bold helvetica, arial, sans-serif;
  9. }
  10. input {
  11. padding: 10px;
  12. }
  13. #list-container {
  14. background-color: white;
  15. color: #448;
  16. border-radius: 25px;
  17. border: 1px solid black;
  18. padding: 25px;
  19. }
  20. </style>
  21. <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
  22. </head>
  23. <body ng-app>
  24. <p>Search Departments: <input type="text" placeholder="Enter search string"
  25. ng-model="searchString"></p>
  26. <div ng-init = "departments = [
  27. { name: 'Sales', contact: 'Marsha Brown'},
  28. { name: 'Support', contact: 'Dave Price'},
  29. { name: 'Production', contact: 'Grant Wales'},
  30. { name: 'Service', contact: 'Sherry Dell'},
  31. { name: 'Administration', contact: 'Sally Bennett'},
  32. { name: 'Accounting', contact: 'Kim Sutherland'},
  33. { name: 'Shipping', contact: 'Sandy Connell'}]"></div>
  34. <div id="list-container">
  35. <ul>
  36. <li ng-repeat="dept in departments | filter: searchString">{{ dept.name + " (" + dept.contact + ")" }}</li>
  37. </ul>
  38. </div>
  39. </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement