Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <html ng-app="events">
  2. <body>
  3. <h1>Hello Plunker!</h1>
  4. Date:
  5. <input type="text" datetime-input="format" />
  6. <br>
  7. Location:
  8. <input type="text" location-input="format" />
  9. </body>
  10. </html>
  11.  
  12. var events = angular.module('events', []);
  13.  
  14. events.directive('locationInput', function() {
  15. function link(scope, element, attrs) {
  16. scope.searchBox = new google.maps.places.SearchBox(element);
  17. console.log(scope.searchBox);
  18. }
  19.  
  20. return {
  21. link: link
  22. };
  23. });
  24.  
  25. events.directive('datetimeInput', function() {
  26. function link(scope, element, attrs) {
  27. $(element).datepicker();
  28. }
  29.  
  30. return {
  31. link: link
  32. };
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement