Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html ng-app="events">
- <body>
- <h1>Hello Plunker!</h1>
- Date:
- <input type="text" datetime-input="format" />
- <br>
- Location:
- <input type="text" location-input="format" />
- </body>
- </html>
- var events = angular.module('events', []);
- events.directive('locationInput', function() {
- function link(scope, element, attrs) {
- scope.searchBox = new google.maps.places.SearchBox(element);
- console.log(scope.searchBox);
- }
- return {
- link: link
- };
- });
- events.directive('datetimeInput', function() {
- function link(scope, element, attrs) {
- $(element).datepicker();
- }
- return {
- link: link
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement