Skip to content

No compilation error is thrown when using Incremental Hydration with 'hydrate never' and extra characters #58358

@brandonroberts

Description

@brandonroberts

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

Yes

Description

With other defer/hydrate commands, if the command is misspelled, a compilation error is thrown.

@defer(hydrate hover) -> error
@defer(hydrate on hovered) -> error

When using @defer(hydrate never), if there are additional characters after never, no compilation error is thrown and it still behaves as if hydrate never was used.

@defer(hydrate nevermind) {
  <app-heavy />
}

@defer(hydrate never, and thank you) {
  <app-heavy />
}

Please provide a link to a minimal reproduction of the bug

github.com/brandonroberts/angular-incremental-hydration-never

Please provide the exception or error you saw

None

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 19.0.0-next.13
Node: 20.18.0
Package Manager: npm 10.8.2
OS: darwin arm64

Angular: 19.1.0-next.0+sha-2aa9f8b
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package Version

@angular-devkit/architect 0.1900.0-next.13
@angular-devkit/build-angular 19.0.0-next.13
@angular-devkit/core 19.0.0-next.13
@angular-devkit/schematics 19.0.0-next.13
@angular/cli 19.0.0-next.13
@angular/ssr 19.0.0-next.13
@schematics/angular 19.0.0-next.13
rxjs 7.8.1
typescript 5.5.4
zone.js 0.15.0

Anything else?

To reproduce the issue

  1. Clone the repo
  2. run npm install
  3. run ng serve
  4. Note no compilation error is thrown
  5. Navigate to http://localhost:4200/about
  6. Click on the Click Me button. Nothing happens because its still using hydrate never

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: compilerIssues related to `ngc`, Angular's template compilercompiler: parsercore: deferIssues related to @defer blocks.state: has PR

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions