2016-01-24 87 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