当我尝试推送到数组并且我有错误“无法读取属性'推送'未定义”。
$scope.projectList = [];
navigator.geolocation.getCurrentPosition(function($scope,position) {
$scope.projectList.push(position.coords.latitude);
}, function(error) {
alert('Unable to get location: ' + error.message);
}, {maximumAge: 0, timeout: 6000, enableHighAccuracy: true })