diff --git a/apps/test-app-e2e/src/e2e/resize.cy.ts b/apps/test-app-e2e/src/e2e/resize.cy.ts index 989459e3..4a22c735 100644 --- a/apps/test-app-e2e/src/e2e/resize.cy.ts +++ b/apps/test-app-e2e/src/e2e/resize.cy.ts @@ -3,9 +3,9 @@ describe('resize', () => { it('should react to viewport resize', () => { cy.viewport(500, 500); - cy.get('pre').should('contain.text', '"width": 485'); + cy.get('pre').should('contain.text', '"width": 500'); cy.viewport(800, 800); - cy.get('pre').should('contain.text', '"width": 785'); + cy.get('pre').should('contain.text', '"width": 800'); }); }); diff --git a/apps/test-app/project.json b/apps/test-app/project.json index e0c3a12f..2cf4c1af 100644 --- a/apps/test-app/project.json +++ b/apps/test-app/project.json @@ -13,7 +13,6 @@ "outputPath": "dist/apps/test-app", "index": "apps/test-app/src/index.html", "browser": "apps/test-app/src/main.ts", - "polyfills": ["zone.js"], "tsConfig": "apps/test-app/tsconfig.app.json", "assets": ["apps/test-app/src/favicon.ico", "apps/test-app/src/assets"], "styles": ["apps/test-app/src/styles.css"], diff --git a/apps/test-app/src/app/app.component.ts b/apps/test-app/src/app/app.component.ts index 9a83abe1..6ce2fa92 100644 --- a/apps/test-app/src/app/app.component.ts +++ b/apps/test-app/src/app/app.component.ts @@ -32,7 +32,9 @@ import { RouterLink, RouterOutlet } from '@angular/router'; Active Element
  • - Document Visibility State + + Document Visibility State +
  • diff --git a/apps/test-app/src/app/app.config.ts b/apps/test-app/src/app/app.config.ts index 56d100ab..24554fa9 100644 --- a/apps/test-app/src/app/app.config.ts +++ b/apps/test-app/src/app/app.config.ts @@ -1,9 +1,13 @@ -import { type ApplicationConfig } from '@angular/core'; +import { + provideExperimentalZonelessChangeDetection, + type ApplicationConfig, +} from '@angular/core'; import { provideRouter } from '@angular/router'; import { provideSvgSprites } from 'ngxtension/svg-sprite'; export const appConfig: ApplicationConfig = { providers: [ + provideExperimentalZonelessChangeDetection(), provideRouter([ { path: 'resize', diff --git a/apps/test-app/src/app/intl/intl.component.ts b/apps/test-app/src/app/intl/intl.component.ts index 7b26797b..d88d03e1 100644 --- a/apps/test-app/src/app/intl/intl.component.ts +++ b/apps/test-app/src/app/intl/intl.component.ts @@ -42,8 +42,8 @@ import { => {{ 'en' | displayNames: 'language' }}

    - {{ 'en' | displayNames: 'script' }} - => {{ 'en' | displayNames: 'script' }} + {{ 'Hang' | displayNames: 'script' }} + => {{ 'Hang' | displayNames: 'script' }}

    {{ 'en' | displayNames: 'region' }} diff --git a/apps/test-app/src/app/track-by/track-by.component.ts b/apps/test-app/src/app/track-by/track-by.component.ts index 75079de8..759e8910 100644 --- a/apps/test-app/src/app/track-by/track-by.component.ts +++ b/apps/test-app/src/app/track-by/track-by.component.ts @@ -5,6 +5,7 @@ import { ElementRef, ViewChild, inject, + signal, } from '@angular/core'; import { TrackById, TrackByProp } from 'ngxtension/trackby-id-prop'; @@ -30,13 +31,13 @@ import { TrackById, TrackByProp } from 'ngxtension/trackby-id-prop';


    - Without TrackBy mutations: {{ mutationsLength.withoutTrackBy }} + Without TrackBy mutations: {{ mutationsLength.withoutTrackBy() }}

    - With TrackBy mutations: {{ mutationsLength.withTrackBy }} + With TrackBy mutations: {{ mutationsLength.withTrackBy() }}

    - With TrackBy prop mutations: {{ mutationsLength.withTrackByProp }} + With TrackBy prop mutations: {{ mutationsLength.withTrackByProp() }}

    `, imports: [NgFor, TrackById, TrackByProp], @@ -47,13 +48,17 @@ export default class TrackByTest { { id: 2, firstName: 'Enea', lastName: 'Jahollari' }, { id: 3, firstName: 'Daniele', lastName: 'Morosinotto' }, ]; - mutationsLength = { withTrackBy: 0, withTrackByProp: 0, withoutTrackBy: 0 }; + mutationsLength = { + withTrackBy: signal(0), + withTrackByProp: signal(0), + withoutTrackBy: signal(0), + }; private destroyRef = inject(DestroyRef); private mutationCallback = (type: keyof typeof this.mutationsLength): MutationCallback => (mutations) => { - this.mutationsLength[type] += mutations.length; + this.mutationsLength[type].update((prev) => prev + mutations.length); }; @ViewChild('parentNoTrackBy', { static: true }) set parentNoTrackBy({