In my routes.ts I have { path: 'members', component: MemberListComponent, resolve: { users: MemberListResolver} },
.
I have the following piece of code in my component:
users: User[];
constructor(private route: ActivatedRoute, private authService: AuthService) { }
ngOnInit() {
this.route.data.subscribe((data) => {
this.users = data.users.filter((u: User) => u.id !== +this.authService.decodedToken.nameid);
});
}
I'm doing the filter in the subscribe method, is it also possible to do this in a pipe, if so how would I do it?