diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 234ef3f..ade7583 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -3,11 +3,12 @@ * SPDX-License-Identifier: MIT */ -import { Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component } from '@angular/core'; import { RouterOutlet } from '@angular/router'; @Component({ selector: 'app-root', + changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [RouterOutlet], templateUrl: './app.component.html', diff --git a/src/app/catalog/product/components/product-detail/product-detail.component.ts b/src/app/catalog/product/components/product-detail/product-detail.component.ts index 2bab890..3b32136 100644 --- a/src/app/catalog/product/components/product-detail/product-detail.component.ts +++ b/src/app/catalog/product/components/product-detail/product-detail.component.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: MIT */ -import { Component, OnInit } from '@angular/core'; +import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { Store } from '@ngrx/store'; import { selectCurrentProductDetails } from '@app/catalog/product/store/product.selectors'; @@ -14,6 +14,7 @@ import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'app-product-detail', + changeDetection: ChangeDetectionStrategy.OnPush, templateUrl: './product-detail.component.html', styleUrls: ['./product-detail.component.scss'], }) diff --git a/src/app/catalog/product/components/product-master/product-master.component.ts b/src/app/catalog/product/components/product-master/product-master.component.ts index 7b570a9..54ad5c8 100644 --- a/src/app/catalog/product/components/product-master/product-master.component.ts +++ b/src/app/catalog/product/components/product-master/product-master.component.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: MIT */ -import { Component, OnInit } from '@angular/core'; +import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { Store } from '@ngrx/store'; import { loadProducts } from '@app/catalog/product/store/product.actions'; import { selectProducts } from '@app/catalog/product/store/product.selectors'; @@ -12,6 +12,7 @@ import { navigate } from '@app/shared/navigation/navigation.actions'; @Component({ selector: 'app-product-master', + changeDetection: ChangeDetectionStrategy.OnPush, templateUrl: './product-master.component.html', styleUrls: ['./product-master.component.scss'], }) diff --git a/src/app/catalog/recommendation/components/recommendations/recommendations.component.ts b/src/app/catalog/recommendation/components/recommendations/recommendations.component.ts index 6ca657d..9d133da 100644 --- a/src/app/catalog/recommendation/components/recommendations/recommendations.component.ts +++ b/src/app/catalog/recommendation/components/recommendations/recommendations.component.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: MIT */ -import { Component, OnInit } from '@angular/core'; +import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { Store } from '@ngrx/store'; import { State } from '@app/reducers'; @@ -12,6 +12,7 @@ import { selectRecommendations } from '@app/catalog/recommendation/store/recomme @Component({ selector: 'app-recommendations', + changeDetection: ChangeDetectionStrategy.OnPush, templateUrl: './recommendations.component.html', styleUrls: ['./recommendations.component.scss'], }) diff --git a/src/app/order/components/order-confirmation/order-confirmation.component.ts b/src/app/order/components/order-confirmation/order-confirmation.component.ts index 36194ad..b42b9f4 100644 --- a/src/app/order/components/order-confirmation/order-confirmation.component.ts +++ b/src/app/order/components/order-confirmation/order-confirmation.component.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: MIT */ -import { Component } from '@angular/core'; +import { ChangeDetectionStrategy, Component } from '@angular/core'; import { Store } from '@ngrx/store'; import { State } from '@app/reducers'; @@ -12,6 +12,7 @@ import { navigate } from '@app/shared/navigation/navigation.actions'; @Component({ selector: 'app-order-confirmation', standalone: true, + changeDetection: ChangeDetectionStrategy.OnPush, templateUrl: './order-confirmation.component.html', styleUrls: ['./order-confirmation.component.scss'], }) diff --git a/src/app/shared/components/product/product.component.ts b/src/app/shared/components/product/product.component.ts index f3f36a3..92851b4 100644 --- a/src/app/shared/components/product/product.component.ts +++ b/src/app/shared/components/product/product.component.ts @@ -3,11 +3,12 @@ * SPDX-License-Identifier: MIT */ -import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; import { Product } from '@models/product'; @Component({ selector: 'app-product', + changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, templateUrl: './product.component.html', styleUrls: ['./product.component.scss'], diff --git a/src/app/shared/components/recommendation/recommendation.component.ts b/src/app/shared/components/recommendation/recommendation.component.ts index 6808eeb..09e8be6 100644 --- a/src/app/shared/components/recommendation/recommendation.component.ts +++ b/src/app/shared/components/recommendation/recommendation.component.ts @@ -3,11 +3,12 @@ * SPDX-License-Identifier: MIT */ -import { Component, Input } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { Recommendation } from '@models/recommendation'; @Component({ selector: 'app-recommendation', + changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, templateUrl: './recommendation.component.html', styleUrls: ['./recommendation.component.scss'], diff --git a/src/app/shared/components/theme/theme-switcher.component.ts b/src/app/shared/components/theme/theme-switcher.component.ts index dc42387..99fcbca 100644 --- a/src/app/shared/components/theme/theme-switcher.component.ts +++ b/src/app/shared/components/theme/theme-switcher.component.ts @@ -2,13 +2,14 @@ // // SPDX-License-Identifier: MIT -import { Component, OnInit } from '@angular/core'; +import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { faMoon, faSun } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; import { CommonModule } from '@angular/common'; @Component({ selector: 'app-theme-switcher', + changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, FontAwesomeModule], templateUrl: './theme-switcher.component.html',