0

我是 Steroids 的新手,我希望导航抽屉在初始化后自动打开(抽屉的 AngularJS 模块名为“profile-filter-drawer”)。

这是我的代码:

angular
  .module('profile-list')
  .controller('IndexController', function($scope, supersonic) {

        var drawerOptions = {
            side: "left",
            width: 150
        }

        supersonic.ui.drawers.init("profile-filter-drawer#index", drawerOptions).then(function()
        {
            supersonic.ui.drawers.open("left");
        });

});

我在 Steroids Connect 中不断收到此日志,但我不明白为什么或如何修复它。

supersonic.ui.drawers.init rejected: {}

注意:如果它在 structure.coffee 中实例化但不是从我的 AngularJS 控制器中实例化,我的导航抽屉正在工作(AngularJS 模块有效)。

谢谢

4

1 回答 1

0

如果您仍然有抽屉代码,structure.coffee那么尝试实例化另一个相同类型的抽屉将被拒绝。我可能错了,但是在尝试推送堆栈中已经存在的视图时也会发生同样的情况。

这是一个相关的GitHub 问题,关于将视图推送到堆栈上并且它们被拒绝。

于 2015-04-29T18:15:36.153 回答