Skip to content

tabs break @Viewchild #573

@RoxKilly

Description

@RoxKilly

Using a template variable within md-tab-group and trying to access it in the component with @Viewchild does not work.
My template

<md-tab-group>
<md-tab>
    <template md-tab-label>Tab Title</template>
    <template md-tab-content>
        <video #vidPlayer>
            <source src="http://localhost/vid.mp4" type="video/mp4">
        </video>   
    </template>
</md-tab>
</md-tab-group>

My component

@ViewChild('vidPlayer') player;
ngAfterViewInit(){console.log(this.player);}

undefined is logged to the console. If I move the <video> element out of <md-tab-group>, it gets correctly logged to the console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions