Angular 2 Component conditionally displaying a list of elements from an array
Naming: A better name for the change event handler is toggleShowOnlyMyPolls().
TypeScript is about types: I'm trying not to forget specifying return types of the methods -- this makes it easy to inspect/scan over the signatures, and gives compile time support.
pollsToDisplay can be relatively cheaply calculated on the fly. That will simplify code significantly at the cost of performance (which is not an issue as long as you don't deal with at least several hundred of Poll objects).




Propose:

export class PollListComponent implements OnInit {
    showOnlyMyPolls = false;
    polls: Poll[] = [];

    get pollsToDisplay(): Poll[] {
        if (!this.showOnlyMyPolls)
            return this.polls;

        const loggedInUserId = this.authService.getLoggedInUserId();
        return this.polls.filter(poll =&gt; poll.userId === loggedInUserId);
    };

    constructor(private pollService: PollService, private authService: AuthService) { }

    ngOnInit(): void {
        this.pollService
            .getPolls()
            .subscribe((polls: Poll[]) =&gt; this.polls = polls);
    }

    toggleShowOnlyMyPolls(): void {
        this.showOnlyMyPolls = !this.showOnlyMyPolls;
    }

    isLoggedIn(): boolean {
        return this.authService.isLoggedIn();
    }
}


How is this code simpler?


pollsToDisplay used to be a field that is assigned in three different places: one in subscribe(...) and two in displayMyPolls(). Each of these places could have a bug, and this code was scattered. Now it's calculated on the fly:


no assignments at all;
everything happens in one place -- if there is a bug with poll list construction, you know where to look for it, easier to unit-test, etc.;
and there is no unnecessary field since get pollsToDisplay() is an accessor.

toggleShowOnlyMyPolls() became trivial, it really does only what it is responsible for, which is mode switching.