I want to make a weather forecast card like this image.
But, I got this error Unexpected value 'undefined' exported by the module 'MaterialComponentsModule'
when I compile. this error occurred. This is the DEMO and code as your reference.
Component Module
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {
MatAutocompleteModule,
MatButtonModule,
MatButtonToggleModule,
MatCardModule,
MatCheckboxModule,
MatChipsModule,
MatDatepickerModule,
MatDialogModule,
MatExpansionModule,
MatGridListModule,
MatIconModule,
MatInputModule,
MatListModule,
MatMenuModule,
MatNativeDateModule,
MatPaginatorModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatRadioModule,
MatRippleModule,
MatSelectModule,
MatSidenavModule,
MatSliderModule,
MatSlideToggleModule,
MatSnackBarModule,
MatSortModule,
MatTableModule,
MatTabsModule,
MatToolbarModule,
MatTooltipModule,
MatStepperModule,
} from '@angular/material';
@NgModule({
imports: [
CommonModule
],
exports: [
CommonModule,
MatAutocompleteModule,
MatButtonModule,
MatButtonToggleModule,
MatCardModule,
MatCheckboxModule,
MatChipsModule,
MatDatepickerModule,
MatDialogModule,
MatExpansionModule,
MatGridListModule,
MatIconModule,
MatInputModule,
MatListModule,
MatMenuModule,
MatNativeDateModule,
MatPaginatorModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatRadioModule,
MatRippleModule,
MatSelectModule,
MatSidenavModule,
MatSliderModule,
MatSlideToggleModule,
MatSnackBarModule,
MatSortModule,
MatTableModule,
MatTabsModule,
MatToolbarModule,
MatTooltipModule,
MatStepperModule
]
})
export class MaterialComponentsModule { }
AppModule
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MaterialComponentsModule } from './material-components.module';
import { environment } from './environments/environment';
import { GeolocationService ,
TransportService,
WeatherService,
CitiesService,
ModalService
} from './services';
import { AppComponent } from './app.component';
import {
MainComponent,
ModalComponent,
CitySelectorComponent,
CityInfoComponent,
CitiesListComponent,
WeatherDescriptionComponent,
WeatherItemComponent,
ForecastDescriptionComponent
} from './components';
@NgModule({
declarations: [
AppComponent,
MainComponent,
ModalComponent,
CitySelectorComponent,
CityInfoComponent,
CitiesListComponent,
WeatherDescriptionComponent,
WeatherItemComponent,
ForecastDescriptionComponent
],
imports: [
BrowserModule,
FormsModule,
HttpClientModule,
BrowserAnimationsModule,
MaterialComponentsModule
],
providers: [
GeolocationService,
TransportService,
WeatherService,
CitiesService,
ModalService
],
entryComponents: [
ModalComponent,
CitySelectorComponent
],
bootstrap: [AppComponent]
})
export class AppModule { }
Hope you all can help me. Thanks in advance