Skip to content

Md-list breaks when using with ng-container or ng-template #5502

Closed
@azarus

Description

@azarus

Bug, feature request, or proposal:

Bug, mdlist & md-nav-list breaks when used with ng-container or ng-template.

What is the expected behavior?

https://i.imgur.com/Iv6pc7q.png

What is the current behavior?

https://i.imgur.com/ca4MC8K.png

What are the steps to reproduce?

<md-nav-list>
		<h3 md-subheader>Tests</h3>
		<a md-list-item *ngFor="let test of tests">
			<ng-container [SubComponent]="test">
			</ng-container>
		</a>
	</md-nav-list>

Dynamic component or template:

	<md-icon md-list-avatar fontIcon="fa-clock-o"></md-icon>
		<p md-line>Time Period</p>
		<p md-line>Queries data from cool</p>

Where right now subcomponent is a custom directive that is just a component factory dynamically loading components into the list based on the data repeated # in *ngFor

What is the use-case or motivation for changing an existing behavior?

It doesn't work like most of the things in material2.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Probably all of them.

Is there anything else we should know?

No.

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