Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 19 Support #16827

Closed
mertsincan opened this issue Nov 22, 2024 · 63 comments
Closed

Angular 19 Support #16827

mertsincan opened this issue Nov 22, 2024 · 63 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@mertsincan
Copy link
Member

Details; #16783

@mertsincan mertsincan pinned this issue Nov 22, 2024
@mertsincan mertsincan added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Nov 22, 2024
@mertsincan mertsincan added this to the 18.0.0-rc.2 milestone Nov 22, 2024
@mertsincan mertsincan moved this to Review in PrimeNG Nov 22, 2024
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 22, 2024
@mertsincan mertsincan removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 22, 2024
@AStoker
Copy link

AStoker commented Nov 22, 2024

If it helps, here's a list of files that needed to be updated in my testing. The Docs still have a lot of work though. AStoker@a1bad87

mertsincan added a commit that referenced this issue Nov 25, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeNG Nov 25, 2024
@mertsincan mertsincan reopened this Nov 25, 2024
@mertsincan mertsincan moved this from Done to In Progress in PrimeNG Nov 25, 2024
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 25, 2024
@mertsincan mertsincan added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Pending Review Issue or pull request is being reviewed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 25, 2024
@NateRadebaugh
Copy link

Can this be back-ported to a 17.x release once this is ready?

@mertsincan
Copy link
Member Author

Today, we had a detailed meeting about Angular 19 and decided to support it with PrimeNG 19. We are very close to the PrimeNG 18.Final. After releasing it, we plan to release PrimeNG 19.rc.1 within 1 to 2 weeks. Thanks a lot for your understanding!

@mertsincan
Copy link
Member Author

Can this be back-ported to a 17.x release once this is ready?

Unfortunately, we do not plan to port it to version 17. Primeng versions will be released following the Angular versions. Otherwise, there will be many breakages in frameworks and libraries that are under such active development. I think this is the most logical thing.

@mertsincan mertsincan modified the milestones: 18.0.0-rc.2, 19.x Nov 25, 2024
@mertsincan mertsincan removed this from PrimeNG Nov 25, 2024
@yarikwest
Copy link

Hi everyone,

Thank you so much for the PRs and feedback! PrimeNG 19 now works with Angular 19. Today, we plan to release PrimeNG 19-rc.1 so you can test it and share your thoughts. master...v19

I’d also like to talk about what’s next for PrimeNG 20. In v18 and v19, our main focus was building the new theming engine, and now it’s complete. For PrimeNG 20, we want to improve the codebase completely. This includes using strict types, adding more tests, moving to a signal-based and zoneless structure, and updating all components with the latest best Angular practices. We have a lot of internal improvements planned and will share more details with you soon.

When is the planned final release of v19?

@mertsincan
Copy link
Member Author

mertsincan commented Dec 10, 2024

When is the planned final release of v19?

Unless there are any major issues, we plan to release PrimeNG v19.Final the next week.

@slawanextlevels
Copy link

I got master...v19 running. Thank you

@mertsincan
Copy link
Member Author

PrimeNG 19.0.0-rc.1 Released; https://www.npmjs.com/package/primeng/v/19.0.0-rc.1

@dalenguyen
Copy link
Contributor

Confirmed that 19.0.0-rc.1 fixed the Uncaught TypeError: fn is not a function issue on my end :)

@gbarrionuevo
Copy link

#17005

@dragsense
Copy link

PrimeNG 19.0.0-rc.1 working fine with angular 19

@alvaroaxo
Copy link

Confirmed, PrimeNG 19rc works with Angular 19

@lalo-mx
Copy link

lalo-mx commented Dec 13, 2024

I have an issue with 19rc, how are the styles configured now?

@import "primeng/resources/themes/fluent-light/theme.css";
X [ERROR] Could not resolve "primeng/resources/themes/fluent-light/theme.css"

    src/primeng.scss:1:8:
      1 │ @import "primeng/resources/themes/fluent-light/theme.css";
        ╵         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  The path "./resources/themes/fluent-light/theme.css" is not exported by package "primeng":

    node_modules/primeng/package.json:46:13:
      46 │   "exports": {
         ╵              ^

@Delagen
Copy link
Contributor

Delagen commented Dec 13, 2024

@lalo-mx RTFM, migration guide is published https://primeng.org/guides/migration

@dragsense
Copy link

I have an issue with 19rc, how are the styles configured now?

@import "primeng/resources/themes/fluent-light/theme.css";
X [ERROR] Could not resolve "primeng/resources/themes/fluent-light/theme.css"

    src/primeng.scss:1:8:
      1 │ @import "primeng/resources/themes/fluent-light/theme.css";
        ╵         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  The path "./resources/themes/fluent-light/theme.css" is not exported by package "primeng":

    node_modules/primeng/package.json:46:13:
      46 │   "exports": {
         ╵              ^

no need to import the css files.

https://primeng.org/theming

Configuration API
Theme
The theme property is used to customize the initial theme.

import { ApplicationConfig } from '@angular/core';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { providePrimeNG } from 'primeng/config';
import Aura from '@primeng/themes/aura';

export const appConfig: ApplicationConfig = {
providers: [
provideAnimationsAsync(),
providePrimeNG({
theme: {
preset: Aura
}
})
]
};

@ThoSap
Copy link
Contributor

ThoSap commented Dec 30, 2024

@radarsu I do the same, I have a PrimeNG 17.18.15 application with Angular 19.0.5 and it is completely zoneless with ChangeDetectionStrategy.OnPush and signals.

Zoneless with signals everywhere already worked before I upgraded to Angular 19 with Angular 18.2.0 and PrimeNG 17.18.9, no issues have been reported by any user so far and Zoneless with this setup has been in production since May 2024.

@JakeAi yeah, the signals make whole codebase so much more managable. I'd recommend mastering them quickly and Angular 19 release is crazy good, so on new project you might want to consider upgrading quickly.

I do a project with Angular 19 fully based on signals, primeng 18 and tailwind v4 beta. Figuring out perfect setup was tough, but those new releases solve so many problems I was struggling with in the past it's worth it (state management with signals feels so much better, management of primitive and semantic CSS values and components, theming and light/dark modes).

I even uninstalled zone.js and did zoneless angular and everything is working great, I no longer have obscured stack traces.

Feel free to contact me privately if you'd like to copy my setup.

@imaksp Haven't yet encountered any problems without it. I use OnPush changeDetection strategy and manage data via signals everywhere. But so far I use just few simple components from PrimeNG in that setup, maybe some advanced ones will have problems.

@sergey-morenets
Copy link

@lalo-mx RTFM, migration guide is published https://primeng.org/guides/migration

Hi @Delagen

It's not clear whether Primeng 19+ supports non-standalone configuration. In the "Getting started" guide(https://primeng.org/installation) there's a following configuration which can be applied for standalone components only:

export const appConfig: ApplicationConfig = {
    providers: [
        provideAnimationsAsync(),
        providePrimeNG({
            theme: {
                preset: Aura
            }
        })
    ]
};

@Delagen
Copy link
Contributor

Delagen commented Jan 5, 2025

@sergey-morenets It's common configuration whenever use standalone or not. It's just new syntax and provider functions. Just read docs.

@ibandim123
Copy link

ibandim123 commented Feb 20, 2025

Confirmed, PrimeNG 19rc works with Angular 19

This is confirmed?

@jex-novatec
Copy link

For me it's not working with the following versions:
"dependencies": { "@angular/common": "~19.1.0", "@angular/compiler": "~19.1.0", "@angular/core": "~19.1.0", "@primeng/themes": "^19.0.6", "primeng": "^19.0.5" },

@gatzsche
Copy link

For me it's not working with the following versions: "dependencies": { "@angular/common": "~19.1.0", "@angular/compiler": "~19.1.0", "@angular/core": "~19.1.0", "@primeng/themes": "^19.0.6", "primeng": "^19.0.5" },

Are there versions that are working?

@samjs89
Copy link

samjs89 commented Feb 20, 2025

@jex-novatec Same for me. not working. below are my dependencies.

{ "@angular/animations": "^19.1.0", "@angular/common": "^19.1.0", "@angular/compiler": "^19.1.0", "@angular/core": "^19.1.0", "@angular/forms": "^19.1.0", "@angular/platform-browser": "^19.1.0", "@angular/platform-browser-dynamic": "^19.1.0", "@angular/router": "^19.1.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0", "@primeng/themes": "^19.0.6", "primeng": "^19.0.6" }

@gatzsche
Copy link

gatzsche commented Feb 20, 2025

The error results from primeng-icons-baseicon.mjs:

features: [i0.ɵɵProvidersFeature([BaseIconStyle]), i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature],

The value i0.ɵɵInputTransformsFeature is undefined.

i0 again is imported via import * as i0 from '@angular/core';

Why is i0.eeInputTransformFeature undefined?

@gatzsche
Copy link

I found it: ɵɵInputTransformsFeature has been removed in Angular 19.1.7. It is available in Angular 19.1.6.

Restricting Angular to 19.1.6 should remove the issue temporarily.

@danielschmitz
Copy link

still not working for me.

PS: i do the postInstall

"dependencies": {
    "@angular/animations": "^19.1.0",
    "@angular/common": "^19.1.0",
    "@angular/compiler": "^19.1.0",
    "@angular/core": "^19.1.0",
    "@angular/forms": "^19.1.0",
    "@angular/platform-browser": "^19.1.0",
    "@angular/platform-browser-dynamic": "^19.1.0",
    "@angular/router": "^19.1.0",
    "@primeng/themes": "^19.0.6",
    "primeng": "^19.0.6",
    "rxjs": "~7.8.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.15.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^19.1.5",
    "@angular/cli": "^19.1.5",
    "@angular/compiler-cli": "^19.1.0",
    "@types/jasmine": "~5.1.0",
    "jasmine-core": "~5.5.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.2.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.1.0",
    "typescript": "~5.7.2"
  }

@gatzsche
Copy link

You need to remove the ^ from the version numbers, which means that in the background minor patches like 19.1.7 are installed. But then you need to increase the versions manually.

@danielschmitz
Copy link

You need to remove the ^ from the version numbers, which means that in the background minor patches like 19.1.7 are installed. But then you need to increase the versions manually.

"dependencies": {
    "@angular/animations": "19.1.7",
    "@angular/common": "19.1.7",
    "@angular/compiler": "19.1.7",
    "@angular/core": "19.1.7",
    "@angular/forms": "19.1.7",
    "@angular/platform-browser": "19.1.7",
    "@angular/platform-browser-dynamic": "19.1.7",
    "@angular/router": "19.1.7",
    "@primeng/themes": "^19.0.6",
    "primeng": "^19.0.6",
    "rxjs": "~7.8.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.15.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^19.1.5",
    "@angular/cli": "^19.1.5",
    "@angular/compiler-cli": "19.1.7",
    "@types/jasmine": "~5.1.0",
    "jasmine-core": "~5.5.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.2.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.1.0",
    "typescript": "~5.7.2"
  }

still not working... any tip?

@gatzsche
Copy link

This should do it:

"dependencies": {
    "@angular/animations": "<=19.1.6",
    "@angular/common": "<=19.1.6",
    "@angular/compiler": "<=19.1.6",
    "@angular/core": "<=19.1.6",
    "@angular/forms": "<=19.1.6",
    "@angular/platform-browser": "<=19.1.6",
    "@angular/platform-browser-dynamic": "<=19.1.6",
    "@angular/router": "<=19.1.6",
    "@primeng/themes": "^19.0.6",
    "primeng": "^19.0.6",
    "rxjs": "~7.8.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.15.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "<=19.1.5",
    "@angular/cli": "<=19.1.6",
    "@angular/compiler-cli": "<=19.1.6",
    "@types/jasmine": "~5.1.0",
    "jasmine-core": "~5.5.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.2.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.1.0",
    "typescript": "~5.7.2"
  }

@gatzsche
Copy link

still not working... any tip?

See my comment before. Version 19.1.7 is broken. Replace it by <= 19.1.6.

@danielschmitz
Copy link

It didn't work either. Can you publish a newly created project on GitHub with only the button from the tutorial working?

In theory, PrimeNG should work just by doing the standard installation, without this postinstall or version adjustment. I hope they fix this ASAP.

@gatzsche
Copy link

There is already an issue for that:

#17730

@pastagaz69
Copy link

still not working... any tip?

See my comment before. Version 19.1.7 is broken. Replace it by <= 19.1.6.

Thanks a lot ! workaround works like a charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.