enter image description hereне может выводить свойства сферы применения
Привет, у меня есть "LOC" свойства в объеме, но не может выводить на консоль "LOC" Массив
в директиве:
return {
scope:{
loc:'='
},
template: '<div id="gmaps"></div>',
link: function(scope, element, attrs) {
var map, infoWindow;
var markers = [];
var defaultLoc = new google.maps.LatLng(49.233614,28.47646199999997);
console.log(scope);
console.log(scope.loc);// undefined
Контроллер:
navigator.geolocation.getCurrentPosition(function(position) {
$scope.$apply(function() {
$scope.loc = [{ latitude:position.coords.latitude}, {longitude:position.coords.longitude}] ;
});
}
HTML:
<div hi-loc loc="loc"></div>