1
我有一个功能,在此功能,我有:离子2全局变量
this.geolocation.getCurrentPosition(posOptions).then((localisation,err) => {
this.storage.get('param1').then((param1) => {
this.storage.get('param2').then((param2) => {
// Do some stuff with localisation, param1 & param2
alert(localisation);
alert(param1);
alert(param2);
})
})
})
这就是我发现,在同时使用“本土化”,“参数1” &“参数2”的唯一途径,如果我这样做:
this.geolocation.getCurrentPosition(posOptions).then((localisation,err) => {
})
this.storage.get('param1').then((param1) => {
})
this.storage.get('param2').then((param2) => {
// Do some stuff with localisation, param1 & param2
alert(localisation);
alert(param1);
alert(param2);
})
它不会找到定位和参数1
谢谢你的家伙!有用 ! –
很高兴听到它:) –