Ionic framework UI路由器bug中的抽屉侧菜单内容?

时间:2022-11-19 23:49:46

I've been coding an Ionic application using Intel XDK and I'm experiencing a weird issue using the Ionic framework. I am using nested states inside the side content of my drawer template and found a weird behaviour with the latest version of Ionic (1.2.4) which is pulled using Bower.

我一直在用英特尔XDK编写一个离子应用程序,我遇到了一个奇怪的问题。我在折叠模板的侧边内容中使用了嵌套状态,并发现使用Bower拖出的最新版本Ionic(1.2.4)有一种奇怪的行为。

With the latest version I was getting a weird behaviour where when transition from state 1 to state 2 would look something like this: weird bug

在最新版本中,当从状态1到状态2的转换看起来像这样:奇怪的bug

Also when in State 2 the side content would no longer be able to swipe the side drawer open as it did in the previous state.

同样,在状态2中,侧边内容将不能像在先前状态中那样滑动侧边抽屉。

This is a link to the plunker were it uses the old 1.0.0 beta version of ionic http://embed.plnkr.co/mX9DJRYMfTNHz0bYyMgw/

这是与柱塞器的链接,如果它使用旧的1.0.0 beta版本的ionic http://embed。plnkr.co/mx9djrymftnhz0byymgw/

The state transitions correctly and the second state still allows for the drawer to be swiped open. I obviously don't want to use an older version of ionic because it doesn't support fancy things like pop overs that I would like use in the app.

状态正确转换,第二个状态仍然允许打开抽屉。我显然不想使用较老版本的ionic,因为它不支持一些花哨的东西,比如我想在应用中使用的pop over。

Thanks,

谢谢,

1 个解决方案

#1


0  

I was able to solve the problem, For the new version of ionic every state transition is cached. When the state transition occurs the side drawer is left open. This is why in the emulator you see the a weird layer lingering but don't see it on the phone. To close the drawer you must use the menu-close directive. I inserted it inside <a menu-close ui-sref ="state2">

我解决了这个问题,因为新版本的离子每个状态转换都被缓存。当状态转换发生时,侧边抽屉保持打开状态。这就是为什么在模拟器中你会看到一个奇怪的层徘徊不去,但在手机上却看不到。要关闭抽屉,你必须使用菜单关闭指令。我将它插入

The menu-close directive will reset the entering view’s history stack, making the new page the root of the history stack.

菜单关闭指令将重置进入视图的历史堆栈,使新页面成为历史堆栈的根。

#1


0  

I was able to solve the problem, For the new version of ionic every state transition is cached. When the state transition occurs the side drawer is left open. This is why in the emulator you see the a weird layer lingering but don't see it on the phone. To close the drawer you must use the menu-close directive. I inserted it inside <a menu-close ui-sref ="state2">

我解决了这个问题,因为新版本的离子每个状态转换都被缓存。当状态转换发生时,侧边抽屉保持打开状态。这就是为什么在模拟器中你会看到一个奇怪的层徘徊不去,但在手机上却看不到。要关闭抽屉,你必须使用菜单关闭指令。我将它插入

The menu-close directive will reset the entering view’s history stack, making the new page the root of the history stack.

菜单关闭指令将重置进入视图的历史堆栈,使新页面成为历史堆栈的根。