angular2 template - grid tags not working in angular 2 -
i trying create grid layout in angular 2 based application angular material2 trying create structure in "app.component.html" file, grid tags error unknown html tags. here code of how trying it: app.component.html
<div class="col-md-8"> <div class="game-area"> <md-grid-list class="tick-tack-grid" cols="3"> <md-grid-tile *ngfor="let block of gs.blocks; let = index; trackby: trackbyfn" (click)="playerclick(i)"><i [class]="block.symbol == 'done' ? 'material-icons tick' : 'material-icons cross'">{{ block.symbol }}</i></md-grid-tile> </md-grid-list> </div> </div>
app.component.ts
import { component } '@angular/core'; import { player } './player'; import { box } './box'; import { gameservice } './game.service'; ...
i believe didn't import mdgridlistmodule module in application module. need this:
import { mdgridlistmodule } '@angular/material'; @ngmodule({ imports: [ mdgridlistmodule ] }) export class appmodule {}
see plunk (main.ts) illustrates this.
Comments
Post a Comment