Greetings! I am brand new to the world of web development and diving straight into learning angular2. Currently, I am working on a practice webpage to enhance my skills but I'm facing issues with implementing md-card.
Here is an excerpt from my app.module.ts file:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import {NewComponent} from './new.component';
import {AppComponent} from './app.component';
import { HttpModule } from '@angular/http';
import {MaterialModule} from '@angular/material';
@NgModule({
imports:[BrowserModule,HttpModule,MaterialModule.forRoot()],
providers:[],
declarations:[AppComponent,NewComponent],
bootstrap:[AppComponent]
})
export class AppModule{}
In the HTML section:
<div *ngFor="let data of dataServer" >
<div id="myimages">
<md-card>
<img src="{{data.images.image3}}">
</md-card>
</div>
</div>
However, I encountered the following error:
Error: Error: XHR error (404 Not Found) loading http://localhost:3000/@angular/material
at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost:3000/node_modules/zone.js/dist/zone.js:647:29)
at ZoneDelegate.invokeTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:236:37)
at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:136:47)
at XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:304:33)
Error loading http://localhost:3000/@angular/material as "@angular/material" from http://localhost:3000/app/app.module.js
I am unsure if I am approaching this the right way. Could someone kindly assist me with the implementation or propose a workaround for using md-card in Angular2 TypeScript? Thank you in advance!