Skip to content

Can't use ngFor on mdGridTile #1327

Closed
Closed
@arekKalbarczyk

Description

@arekKalbarczyk

Hi!
It seems that md-grid-tile does not recognize ngFor, resulting in template parse error.

angular version: 2.0.0
material: 2.0.0-alpha.8-2

My code:

<md-grid-list cols="6" rowHeight="fit">
  <md-grid-tile *ngFor="let campaignColumn of campaignListColumns" 
                [colspan]="1" 
                [rowspan]="1">
    {{ campaignColumn }}
  </md-grid-tile>
</md-grid-list>

campaignListColumns is just a plain array of strings.

error msg:

Can't bind to 'ngForOf' since it isn't a known property of 'md-grid-tile'.
1. If 'md-grid-tile' is an Angular component and it has 'ngForOf' input, then verify that it is part of this module.
2. If 'md-grid-tile' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this.

Property binding ngForOf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "directives" sectio
<md-grid-list cols="6" rowHeight="fit">
  [ERROR ->]<md-grid-tile *ngFor="let campaignColumn of campaignListColumns" [colspan]="1" [rowspan]="1">
    {{ "): CampaignsList@12:2
    at TemplateParser.parse (http://localhost:3000/vendor.bundle.js:20393:19)
    at RuntimeCompiler._compileTemplate (http://localhost:3000/vendor.bundle.js:18274:51)
    at http://localhost:3000/vendor.bundle.js:18197:83
    at Set.forEach (native)
    at compile (http://localhost:3000/vendor.bundle.js:18197:47)
    at ZoneDelegate.invoke (http://localhost:3000/polyfills.bundle.js:15090:28)
    at Zone.run (http://localhost:3000/polyfills.bundle.js:14983:43)
    at http://localhost:3000/polyfills.bundle.js:15349:57
    at ZoneDelegate.invokeTask (http://localhost:3000/polyfills.bundle.js:15123:37)
    at Zone.runTask (http://localhost:3000/polyfills.bundle.js:15023:47)
    at drainMicroTaskQueue (http://localhost:3000/polyfills.bundle.js:15255:35)

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