I'm trying to use data table with ng2-material library as following:
<md-data-table [selectable]="true">
<thead>
<tr md-data-table-header-selectable-row>
<th class="md-text-cell">Material</th>
<th>Quantity</th>
<th>Unit price</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let material of materials" md-data-table-selectable-row [selectable-value]="material.id">
<td class="md-text-cell">{{ material.name }}</td>
<td>{{ material.quantity }}</td>
<td>{{ material.price }}</td>
</tr>
</tbody>
</md-data-table>
But Angular2 doesn't recognize the md-data-table
tags. I've found out that I don't have the @angular2-material in my node_modules
directory. Decided to install it by command:
npm install --save ng2-material
But somehow, some errors appears in the console:
+-- UNMET PEER DEPENDENCY @angular/[email protected]
-- [email protected]
-- UNMET PEER DEPENDENCY @angular/[email protected]npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ch okidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@ 1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64" })
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but non e was installed.
Any help appreciated.
node_modules
. How have you added it to your actual project, beyond just thenpm install
? – jonrsharpenode_modules
directory, with a lot of stuff inside. But the data table from that site requires an@angular2-material
module, which actually doesnt exist in thenode_modules
folder. But it supposed to be here, since Ive installed it... – Megazord@angular2-material
a completely different package tong2-material
. – jonrsharpe