From 5e9c2ceaf381f0dcede9feec725401eaa2f9e821 Mon Sep 17 00:00:00 2001 From: splincode Date: Wed, 27 Nov 2024 11:08:43 +0300 Subject: [PATCH] feat: upgrade to Angular 19 --- apps/demo/project.json | 6 +- apps/demo/server.ts | 2 +- apps/demo/src/app/app.component.ts | 5 +- apps/demo/src/app/app.config.ts | 7 +- apps/demo/src/app/home/home.component.html | 2 +- apps/demo/src/app/home/home.component.less | 14 +- apps/demo/src/app/home/home.component.ts | 6 +- apps/demo/src/environments/environment.ts | 13 - apps/demo/src/index.html | 5 +- package-lock.json | 33675 ++++++++----------- package.json | 41 +- tsconfig.json | 1 + 12 files changed, 13525 insertions(+), 20252 deletions(-) diff --git a/apps/demo/project.json b/apps/demo/project.json index b9830c32..692de8f8 100644 --- a/apps/demo/project.json +++ b/apps/demo/project.json @@ -5,12 +5,12 @@ "sourceRoot": "apps/demo/src", "targets": { "build": { - "executor": "@angular-devkit/build-angular:application", + "executor": "@angular/build:application", "options": { "outputPath": "dist/demo", "index": "apps/demo/src/index.html", "browser": "apps/demo/src/main.ts", - "polyfills": ["zone.js"], + "polyfills": [], "tsConfig": "apps/demo/tsconfig.app.json", "baseHref": "./", "assets": [ @@ -46,7 +46,7 @@ "defaultConfiguration": "production" }, "serve": { - "executor": "@angular-devkit/build-angular:dev-server", + "executor": "@angular/build:dev-server", "configurations": { "production": { "buildTarget": "demo:build:production" diff --git a/apps/demo/server.ts b/apps/demo/server.ts index 4c14a0e7..665fff85 100644 --- a/apps/demo/server.ts +++ b/apps/demo/server.ts @@ -2,7 +2,7 @@ import {dirname, join, resolve} from 'node:path'; import {fileURLToPath} from 'node:url'; import {APP_BASE_HREF} from '@angular/common'; -import {CommonEngine} from '@angular/ssr'; +import {CommonEngine} from '@angular/ssr/node'; import {provideLocation, provideUserAgent} from '@ng-web-apis/universal'; import express from 'express'; diff --git a/apps/demo/src/app/app.component.ts b/apps/demo/src/app/app.component.ts index f6ee1e90..63ee96f9 100644 --- a/apps/demo/src/app/app.component.ts +++ b/apps/demo/src/app/app.component.ts @@ -1,12 +1,11 @@ import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; import {RouterOutlet} from '@angular/router'; import {TuiRoot} from '@taiga-ui/core'; -import {TuiEditor, TuiEditorSocket} from '@taiga-ui/editor'; @Component({ standalone: true, - selector: 'app', - imports: [RouterOutlet, TuiEditor, TuiEditorSocket, TuiRoot], + selector: 'app-root', + imports: [RouterOutlet, TuiRoot], templateUrl: './app.component.html', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/apps/demo/src/app/app.config.ts b/apps/demo/src/app/app.config.ts index e96e95a4..e6418ffc 100644 --- a/apps/demo/src/app/app.config.ts +++ b/apps/demo/src/app/app.config.ts @@ -1,5 +1,9 @@ import type {ApplicationConfig, Injector} from '@angular/core'; -import {importProvidersFrom, INJECTOR} from '@angular/core'; +import { + importProvidersFrom, + INJECTOR, + provideExperimentalZonelessChangeDetection, +} from '@angular/core'; import {provideClientHydration} from '@angular/platform-browser'; import {provideAnimations} from '@angular/platform-browser/animations'; import {provideRouter} from '@angular/router'; @@ -10,6 +14,7 @@ import {TUI_SANITIZER} from '@taiga-ui/legacy'; export const appConfig: ApplicationConfig = { providers: [ + provideExperimentalZonelessChangeDetection(), provideClientHydration(), provideAnimations(), provideRouter([ diff --git a/apps/demo/src/app/home/home.component.html b/apps/demo/src/app/home/home.component.html index 710c1930..b1d13779 100644 --- a/apps/demo/src/app/home/home.component.html +++ b/apps/demo/src/app/home/home.component.html @@ -48,7 +48,7 @@

}
-