From d91af0beb7bf3d6368cc16575cbca9ce33fd01a6 Mon Sep 17 00:00:00 2001 From: alcfeoh Date: Wed, 29 Nov 2023 16:49:11 -0800 Subject: [PATCH] Made dialog component standalone for easier component testing with Cypress --- src/app/app.module.ts | 3 +-- src/app/dialog/dialog.component.ts | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index a7645d3..b637d93 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -8,7 +8,6 @@ import { HelloComponent } from './hello/hello.component'; import { routing } from './app.routing'; import {LoginComponent} from "./router/login/login.component"; import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http"; -import { DialogComponent } from './dialog/dialog.component'; import { HeaderComponent } from './header/header.component'; import {LicensePlateComponent} from './license-plate/license-plate.component'; import { CarouselComponent } from './carousel/carousel.component'; @@ -22,7 +21,7 @@ import { JumbotronComponent } from './jumbotron/jumbotron.component'; @NgModule({ declarations: [ AppComponent, HelloComponent, LicensePlateComponent, - LoginComponent, DialogComponent, HeaderComponent, + LoginComponent, HeaderComponent, CarouselComponent, CurrencySwitcherComponent, CheckoutFormComponent, CheckoutViewComponent, CartViewComponent, JumbotronComponent ], diff --git a/src/app/dialog/dialog.component.ts b/src/app/dialog/dialog.component.ts index b4326f1..d553b9c 100644 --- a/src/app/dialog/dialog.component.ts +++ b/src/app/dialog/dialog.component.ts @@ -1,9 +1,12 @@ import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; +import {NgIf} from '@angular/common'; @Component({ selector: 'app-dialog', templateUrl: './dialog.component.html', - styleUrls: ['./dialog.component.css'] + styleUrls: ['./dialog.component.css'], + imports: [NgIf], + standalone: true }) export class DialogComponent implements OnInit {