"use strict"; (function () { 'use strict'; angular.module('myitsmApp') .directive('getDirections', ['googleMapService', function (googleMapService) { return { restrict: 'E', template: '', scope: { destination: '=' }, link: function (scope) { scope.getDirections = function () { var url = googleMapService.getDirectionUrl(scope.destination); window.open(url, '_blank'); }; } }; }]); }());