如何从sencha touch中的导航堆栈中删除特定视图?

Har*_*nan 4 navigation extjs sencha-touch sencha-touch-2

我正在推动这样的观点 this.up('navView').push({xtype: 'myView'})

如何删除导航堆栈中间的特定视图?

至少我应该摆脱这个警告

[WARN][Ext.Component#constructor] Registering a component with a id (listxyz) which has already been used. Please ensure the existing component has been destroyed (Ext.Component#destroy().
Run Code Online (Sandbox Code Playgroud)

小智 5

在推送视图之前检查天气视图已经存在,并且如果它已经存在则将其销毁,因此您不会获得这些警告并且可以轻松导航.

if(Ext.getCmp('myView')){
                Ext.getCmp('myView').destroy();
}

//Push myView

where  myView should be the id of that view declared in config of that view


    config: {

        id:'myView',

    }
Run Code Online (Sandbox Code Playgroud)