From 40910cae222003fce36b05c90a7c5b88e9c98c3f Mon Sep 17 00:00:00 2001 From: Matthew Harris Date: Mon, 6 Jan 2025 14:22:02 +0000 Subject: [PATCH 1/2] docs(build-options): remove enableProdMode() reference It's discouraged now: https://angular.dev/api/core/enableProdMode "Using this method is discouraged as the Angular CLI will set production mode when using the optimization option." --- docs/angular/build-options.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/angular/build-options.md b/docs/angular/build-options.md index 04a9946739b..22659d46e5a 100644 --- a/docs/angular/build-options.md +++ b/docs/angular/build-options.md @@ -49,10 +49,6 @@ import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; import { environment } from './environments/environment'; -if (environment.production) { - enableProdMode(); -} - bootstrapApplication(AppComponent, { providers: [ { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }, From 2d03ffbd4059b097da26392163210adecdc91de9 Mon Sep 17 00:00:00 2001 From: Brandy Smith <6577830+brandyscarney@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:44:26 -0500 Subject: [PATCH 2/2] docs(build-options): remove all usage of enableProdMode() --- docs/angular/build-options.md | 20 ++-------------- .../version-v7/angular/build-options.md | 24 ++----------------- 2 files changed, 4 insertions(+), 40 deletions(-) diff --git a/docs/angular/build-options.md b/docs/angular/build-options.md index 22659d46e5a..630864d1621 100644 --- a/docs/angular/build-options.md +++ b/docs/angular/build-options.md @@ -47,7 +47,6 @@ import { provideIonicAngular, IonicRouteStrategy } from '@ionic/angular/standalo import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; -import { environment } from './environments/environment'; bootstrapApplication(AppComponent, { providers: [ @@ -140,7 +139,7 @@ export class AppComponent { Icons registered in an application entry point can then be referenced by name anywhere in the application. ```html title="home.page.html" - @@ -302,7 +301,7 @@ export class AppComponent { Icons registered in an application entry point can then be referenced by name anywhere in the application. ```html title="home.page.html" - @@ -428,11 +427,6 @@ import { RouteReuseStrategy, provideRouter } from '@angular/router'; import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} bootstrapApplication(AppComponent, { providers: [ @@ -556,11 +550,6 @@ import { RouteReuseStrategy, provideRouter } from '@angular/router'; import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} @NgModule({ declarations: [AppComponent], @@ -601,11 +590,6 @@ import { RouteReuseStrategy, provideRouter } from '@angular/router'; import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} @NgModule({ declarations: [AppComponent], diff --git a/versioned_docs/version-v7/angular/build-options.md b/versioned_docs/version-v7/angular/build-options.md index 7c179cbdd6b..138990b52b8 100644 --- a/versioned_docs/version-v7/angular/build-options.md +++ b/versioned_docs/version-v7/angular/build-options.md @@ -44,11 +44,6 @@ import { provideIonicAngular, IonicRouteStrategy } from '@ionic/angular/standalo import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} bootstrapApplication(AppComponent, { providers: [ @@ -141,7 +136,7 @@ export class AppComponent { Icons registered in an application entry point can then be referenced by name anywhere in the application. ```html title="home.page.html" - @@ -280,7 +275,7 @@ export class AppComponent { Icons registered in an application entry point can then be referenced by name anywhere in the application. ```html title="home.page.html" - @@ -383,11 +378,6 @@ import { RouteReuseStrategy, provideRouter } from '@angular/router'; import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} bootstrapApplication(AppComponent, { providers: [ @@ -511,11 +501,6 @@ import { RouteReuseStrategy, provideRouter } from '@angular/router'; import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} @NgModule({ declarations: [AppComponent], @@ -556,11 +541,6 @@ import { RouteReuseStrategy, provideRouter } from '@angular/router'; import { routes } from './app/app.routes'; import { AppComponent } from './app/app.component'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} @NgModule({ declarations: [AppComponent],