Изображение 1 - Перед включением диалога в компонент ввода я получаю эту очевидную ошибку
Изображение 2 - После добавления диалога в компонент ввода я получаю эту ошибку
в чем может быть возможная ошибка?
вот мой диалогкод
Component({
selector: "add-seller-dialog",
templateUrl: "./seller-dialog/add-seller.html",
styleUrls: ["./seller.component.sass"]
});
export class AddSellerDialog {
constructor(
public dialogRef: MatDialogRef<AddSellerDialog>, //@Inject(MAT_DIALOG_DATA) public data: DialogData
public sellerService: SellerService
) {}
onNoClick(): void {
this.dialogRef.close({
close: true
});
}
}
HTML-код - отсюда я вызываю функцию для открытия диалога
TS-код (родительский класс) -Здесь я использую функцию openAddSellerDialog () для вызова диалога
Код модуля приложения
import { BrowserModule } from "@angular/platform-browser";
import { NgModule } from "@angular/core";
import { AppRoutingModule } from "./app-routing.module";
import { AppComponent } from "./app.component";
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { DashboardComponent } from "./admin/dashboard/dashboard.component";
import { ReactiveFormsModule } from "@angular/forms";
import { FormsModule } from "@angular/forms";
import { HttpClientModule, HTTP_INTERCEPTORS } from "@angular/common/http";
import {
MatGridListModule,
MatCardModule,
MatMenuModule,
MatIconModule,
MatButtonModule,
MatToolbarModule,
MatSidenavModule,
MatListModule,
MatInputModule,
MatPaginatorModule,
MatSortModule,
MatSelectModule,
MatCheckboxModule,
MatDialogModule,
MatDatepickerModule,
MatNativeDateModule,
MatBadgeModule,
MatSnackBarModule,
MatRadioModule,
MatTabsModule
} from "@angular/material";
import { LayoutModule } from "@angular/cdk/layout";
import { NavComponent } from "./admin/nav/nav.component";
import {
ProductsComponent,
AddProductDialog,
UpdateProductDialog,
TransferProductDialog
} from "./admin/products/products.component";
import {
CampaignComponent,
AddCampaignDialog,
DeleteCampaignDialog,
AddSellerDialog
} from "./admin/campaign/campaign.component";
import { MatTableModule } from "@angular/material/table";
import { MatFormFieldModule } from "@angular/material/form-field";
import { ProductService } from "./services/product.service";
import {
SelectedCampaignComponent,
OrderDialog
} from "./admin/campaign/selected-campaign/selected-campaign.component";
import { EventComponent } from "./event/event.component";
import { CategoriesComponent } from "./event/main/categories/categories.component";
import { EventNavComponent } from "./event/main/event-nav/event-nav.component";
import {
EventProductsComponent,
CartSnackBarComponent
} from "./event/main/event-products/event-products.component";
import { FilterPipe } from "./pipes/filter";
import { EventCartComponent } from "./event/main/event-cart/event-cart.component";
import { EventCheckoutComponent } from "./event/main/event-checkout/event-checkout.component";
import { AuthComponent } from "./auth/auth.component";
import { OrderService } from "./services/order.service";
import { JwtService } from "./services/jwt.service";
import { AuthService } from "./services/auth.service";
import { CampaignService } from "./services/campaign.service";
import { CartService } from "./services/cart.service";
import { HttpTokenInterceptor } from "./Interceptors/http.token.interceptor";
import { AuthGuard } from "./services/auth.guard";
import { ExcelService } from "./services/excel.service";
import { ServiceWorkerModule } from "@angular/service-worker";
import { environment } from "../environments/environment";
import { SellerComponent } from "./admin/seller/seller.component";
import { SellerService } from "./services/seller.service";
@NgModule({
declarations: [
AppComponent,
DashboardComponent,
NavComponent,
ProductsComponent,
CampaignComponent,
AddProductDialog,
UpdateProductDialog,
TransferProductDialog,
AddCampaignDialog,
DeleteCampaignDialog,
OrderDialog,
SelectedCampaignComponent,
EventComponent,
CategoriesComponent,
EventNavComponent,
EventProductsComponent,
FilterPipe,
CartSnackBarComponent,
EventCartComponent,
EventCheckoutComponent,
AuthComponent,
AddSellerDialog,
SellerComponent
],
imports: [
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
FormsModule,
ReactiveFormsModule,
HttpClientModule,
MatGridListModule,
MatCardModule,
MatMenuModule,
MatIconModule,
MatButtonModule,
LayoutModule,
MatToolbarModule,
MatSidenavModule,
MatListModule,
MatTableModule,
MatFormFieldModule,
MatInputModule,
MatPaginatorModule,
MatSortModule,
MatSelectModule,
MatCheckboxModule,
MatDialogModule,
MatDatepickerModule,
MatNativeDateModule,
MatBadgeModule,
MatSnackBarModule,
MatTabsModule,
MatRadioModule,
ServiceWorkerModule.register("ngsw-worker.js", {
enabled: environment.production
})
],
providers: [
{ provide: HTTP_INTERCEPTORS, useClass: HttpTokenInterceptor, multi: true },
ProductService,
OrderService,
JwtService,
AuthService,
CampaignService,
CartService,
AuthGuard,
SellerService,
ExcelService
],
entryComponents: [
AddProductDialog,
UpdateProductDialog,
TransferProductDialog,
AddCampaignDialog,
DeleteCampaignDialog,
OrderDialog,
CartSnackBarComponent,
AddSellerDialog
],
bootstrap: [AppComponent]
})
export class AppModule {}