Skip to content

Cannot access ListView element with ViewChild decorator #188

@tjvantoll

Description

@tjvantoll

I’ve been switching my guide over to using the @ViewChild decorator to get references to views within templates, but one weird thing I found is that I can’t use the technique to get a reference to a <ListView> element.

That is, if I use the following syntax:

<ListView #foo ...></ListView>
@ViewChild("foo") foo: ElementRef;

this.foo is undefined. If I move #foo to another element—e.g. <Image #foo>—the reference is resolved as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions