AppGyver:无法在超音速应用程序中连续打开两个模式

AppGyver: Can't open two modals in succession in a supersonic app

我试图连续打开两个视图,都作为 Appgyver 项目中的模式。当我执行 supersonic.ui.modal.hide()supersonic.ui.modal.show(some_view) 时,第二个视图不显示。如果我在 modal.hide()modal.show() 之间插入一个 alert('here'),它似乎可以工作。这里有什么问题?连续supsersonic.ui.layers.pop()supersonic.ui.layers.push(another_view)也是一样。

用法示例:

}else if (option === 'chooseLocation'){
  $scope.currentOption = "location you chose.";
  $scope.f = true;
  supersonic.ui.modal.hide().then(function(){
    supersonic.ui.modal.show("chooseLocation");
    $localStorage.locationOption = 'lastUsed';
  });
}

我今天早上尝试的另一个片段,它与模态无关,但也不起作用:

supersonic.ui.layers.popAll().then(function(){
  var view = new supersonic.ui.View("searchresults#index?"+paramText);
  supersonic.ui.layers.push(view);
});

我在日志屏幕上遇到的错误:

landing#drawer  11:23:29.382    error   
"supersonic.ui.layers.popAll rejected: {}"

这似乎是 Supersonic API 中的一个错误。

当本机包装器收到 API 调用时,将调用 Javascript 成功回调。这是无效行为。当本机包装器 完成 API 调用(预期行为)时,应调用 Javascript 成功回调。

作为解决方法,使用 Steroids.js 事件(例如 didclose)来确定本机 API 调用何时完成。 有关更多文档,请参阅 Steroids modals and Steroids layers

我在 AppGyver Github issues

中提交了一个新错误