Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter data from promise instead of array #66

Open
MHDMAM opened this issue Jan 12, 2016 · 3 comments
Open

Filter data from promise instead of array #66

MHDMAM opened this issue Jan 12, 2016 · 3 comments

Comments

@MHDMAM
Copy link

MHDMAM commented Jan 12, 2016

is there a way to get the items array from a promise function?

What i'm trying to do is get the search term from ionFilterBar and call my backend server to get the the array that i need to pass to items array.

Thanks

@gsanjeevkumar
Copy link

$scope.showFilterBar = function(){
filterBarInstance = $ionicFilterBar.show({
items: $scope.items,
update: function (filteredItems, filterText) {

filterText is what you are looking for may be.

@MHDMAM
Copy link
Author

MHDMAM commented Jan 13, 2016

Update function Called after the items are filtered I don't think it would work.

Thanks anyway.

@gsanjeevkumar
Copy link

I think the items will have to contain all the items to be filtered prior to, yes and then the update function will be have the filteredItems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants