import { Pipe, PipeTransform } from '@angular/core';
import { Post } from 'app/model/post';

@Pipe({
  name: 'posttypepipe'
})
export class PosttypepipePipe implements PipeTransform {

  transform(posts: Post[], args?: any): any {
    return posts.filter(post=>post.type == args);
  }

}
