2016-01-24 86 views
0

我正在使用离子过滤器,当我单击过滤器栏中的取消按钮时,我可以删除过滤器,但是当我想要自动执行该操作时无需在移动标签时单击取消按钮我是无法做到这一点。无法去除离子过滤器

// code in angular controller for initializing the filter 
var filterBarInstance;  
filterBarInstance = $ionicFilterBar.show({ 
}); 

// when I shift tabs I am calling the below method to close the modal of the filter(if the modal is opened) 
filterBarInstance = $ionicFilterBar.show({ 
    cancel : '', 
    }); 

我打电话上述方法whcih存在于过滤器的指令,但该方法没有得到触发。请使用网址https://github.com/djett41/ionic-filter-bar/blob/master/js/ionic.filter.bar.directive.js,并提供一些解决方案来解决此问题。

+0

请人下载你的应用程序,以帮助解决它是不会发生的。需要在问题中提供更多代码,并告诉我们您遇到的错误是什么,以便我们可以提供帮助。 – Jeff

+0

@Jeff:好的,我现在很抱歉我已经更新了我的代码,并提供了我在应用程序中使用的过滤器的指令的url。 – Karthik

+0

@Jeff:为什么你没有删除投票,我更新了我的查询。 – Karthik

回答

1

尝试filterBarInstance()

我希望解决您的问题

+0

这不提供问题的答案。一旦你有足够的[声誉](http://stackoverflow.com/help/whats-reputation),你将能够[评论任何职位](http://stackoverflow.com/help/privileges/comment);相反,[提供不需要提问者澄清的答案](http://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-c​​an- I-DO-代替)。 - [来自评论](/评论/低质量帖/ 11534233) –

+0

嗨,我试图给解决方案 – WYSIWYG