我有()
$scope.getMail=function(){
$http.get(APISource).
success(function(data) {
$scope.mail =data;
}).
error(function(data) {
console.log("error");
console.log(data);
});
}
这个功能我很节省$ scope.mail返回数据的成功
称为getMail的功能; 并且我还有另一个功能
function1()在同一个控制器中,但$ scope.mail不可访问。
请大家帮忙。
'mail'可能因为不确定的'$ GET'是一个异步调用...当你调用功能1? – tymeJV
调用getMail() –