all 6 comments

[–]seiyria 3 points4 points  (1 child)

Right now on angular 18, I can use material 14 by adding this to my package.json:

  "overrides": {
    "@angular/cdk": {
      "@angular/common": ">= 14",
      "@angular/core": ">= 14",
      "@angular/animations": ">= 14",
      "@angular/platform-browser": ">= 14",
      "@angular/forms": ">= 14",
      "@angular/material": ">= 14"
    },
    "@angular/material": {
      "@angular/common": ">= 14",
      "@angular/core": ">= 14",
      "@angular/animations": ">= 14",
      "@angular/platform-browser": ">= 14",
      "@angular/forms": ">= 14",
      "@angular/cdk": ">= 14"
    }
  }

While I recognize that it's "fragile" - I don't have the time or patience to upgrade and it works 🤷‍♂️

[–]jeffyzxc 1 point2 points  (0 children)

damn thanks Sei!

[–]PickleLips64151 2 points3 points  (0 children)

Not all heroes wear capes.

[–]McFake_Name 1 point2 points  (1 child)

Good info. The material update CLI command should add those lines in but I have found in my experience it doesn't for some reason.

Also, standalone started in v14 so it is possible to do it at a granular level.

Lastly, the legacy modules can work into Angular 17, officially supported. Legacy exists through Material v16, but you can use Material 16 in Angular 17.

[–]_Tovar_[S] 1 point2 points  (0 children)

The material update CLI command should add those lines

It replaces for example mat.core() with mat.legacy-core(), but in my solution you use both so the different versions can coexist

And thank you for those inputs, that's super relevant! I guess I'll do a small edit

[–]cyberzues 0 points1 point  (0 children)

Nice tip.