@@ -201,7 +201,7 @@ <h1 class="title">
201201/* global document */
202202(function() {
203203 'use strict';
204- var NgMap, $timeout, NavigatorGeolocation;
204+ var NgMap, $timeout, $log, NavigatorGeolocation;
205205 var getDirectionsRenderer = function(options, events) {
206206 if (options.panel) {
207207 options.panel = document.getElementById(options.panel) ||
@@ -258,10 +258,11 @@ <h1 class="title">
258258 }
259259 };
260260 var directions = function(
261- Attr2MapOptions, _$timeout_, _NavigatorGeolocation_, _NgMap_) {
261+ Attr2MapOptions, _$timeout_, _$log_, _NavigatorGeolocation_, _NgMap_) {
262262 var parser = Attr2MapOptions;
263263 NgMap = _NgMap_;
264264 $timeout = _$timeout_;
265+ $log = _$log_;
265266 NavigatorGeolocation = _NavigatorGeolocation_;
266267 var linkFunc = function(scope, element, attrs, mapController) {
267268 mapController = mapController[0]||mapController[1];
@@ -279,12 +280,12 @@ <h1 class="title">
279280 $timeout(function(){
280281 var panel =
281282 document.getElementById(val) || document.querySelector(val);
282- console. log('setting ', attrName, 'with value', panel);
283+ $ log.debug ('setting ', attrName, 'with value', panel);
283284 panel && renderer.setPanel(panel);
284285 });
285286 } else if (options[attrName] !== val) { //apply only if changed
286287 var optionValue = parser.toOptionValue(val, {key: attrName});
287- console. log('setting ', attrName, 'with value', optionValue);
288+ $ log.debug ('setting ', attrName, 'with value', optionValue);
288289 options[attrName] = optionValue;
289290 updateRoute(renderer, options);
290291 }
@@ -305,7 +306,7 @@ <h1 class="title">
305306 };
306307 }; // var directions
307308 directions.$inject =
308- ['Attr2MapOptions', '$timeout', 'NavigatorGeolocation', 'NgMap'];
309+ ['Attr2MapOptions', '$timeout', '$log', ' NavigatorGeolocation', 'NgMap'];
309310 angular.module('ngMap').directive('directions', directions);
310311})();
311312</ code > </ pre >
0 commit comments