Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. angular.module('MyApp')
  2. .filter('campaignFilter', function(){
  3. return function(options, client_ids) {
  4. if (client_ids == null) {
  5. return options;
  6. } else {
  7. filtered = [];
  8.  
  9. angular.forEach(options, function(option){
  10. if (client_ids.indexOf(option.client_id) > -1) {
  11. filtered.push(option);
  12. };
  13. });
  14.  
  15. return filtered;
  16. }
  17. }
  18. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement