我在我的cordova移动应用程序中集成了angular-google-maps.我想使用以下功能刷新地图.
function refreshMap() {
$scope.map.control.refresh({
latitude: $scope.location.T_Lat_Deg_W.value,
longitude: $scope.location.T_Long_Deg_W.value
})
}
Run Code Online (Sandbox Code Playgroud)
但是错误很少见
angular.js:13540 TypeError:$ scope.map.control.refresh不是函数
at Scope.refreshMap (mapController.js:122)
at fn (eval at <anonymous> (angular.js:1), <anonymous>:4:224)
at expensiveCheckFn (angular.js:15475)
at callback (angular.js:25008)
at Scope.$eval (angular.js:17219)
at Scope.$apply (angular.js:17319)
at HTMLAnchorElement.<anonymous> (angular.js:25013)
at defaultHandlerWrapper (angular.js:3456)
at HTMLAnchorElement.eventHandler (angular.js:3444)
Run Code Online (Sandbox Code Playgroud)
这是这个问题的JSFiddle示例.
有没有办法解决这个问题?谢谢 !
javascript google-maps angularjs cordova angular-google-maps
我想要minlength=8和maxlength=14,我怎样才能实现这个验证。
html:
<input type="text" name="354" id="field">
Run Code Online (Sandbox Code Playgroud)
jQuery:
$("input[name=354]").keypress(function(e){
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
$("#errmsg").html("Digits only").show().fadeOut("slow");
return false;
}
});
Run Code Online (Sandbox Code Playgroud) 所以我有相当具体的任务。我想创建一个将分贝单位加在一起的函数。目前,您必须输入类似
=10*LOG10(10^(A1/10)+10^(A2/10))
如果您想将15个零件加在一起,则可以使它更长。有点痛苦。
理想情况下,它将像excel函数一样工作,SUM并且可以接受任何输入。有人可以帮助我将其组合在一起,或者至少告诉我如果必须从头开始创建SUM会是什么样子?
最好,亨亨
在我的angularJS应用程序中,我有两个模块:模块A和模块B.
angular.module('A').controller('ACtrl',function($scope){
$scope.alertA = function(){alert('a');}
//...
});
angular.module('B').controller('BCtrl',function($scope){
//...
});
Run Code Online (Sandbox Code Playgroud)
如何调用alertA模块B中的函数?
javascript ×3
angularjs ×2
cordova ×1
decibel ×1
excel ×1
excel-vba ×1
google-maps ×1
html ×1
jquery ×1
vba ×1