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

Add support for Angular 17 #62

Open
mxshdev opened this issue Nov 10, 2023 · 10 comments
Open

Add support for Angular 17 #62

mxshdev opened this issue Nov 10, 2023 · 10 comments

Comments

@mxshdev
Copy link

mxshdev commented Nov 10, 2023

Describe the feature you would like to see added

Add support for Angular 17

Describe the solution you'd like

Update peer dependencies to allow angular 16:

"peerDependencies": {
    "@angular/common": "^15.0.0",
    "@angular/core": "^15.0.0",
    "rxjs": ">=6.0.0"
}

Describe alternatives you have considered

  1. Keep on old angular
  2. Force update anyway and run "npm install --force" every time
@janousek
Copy link

Angular 17 has breaking change, that affect change detection (and ngxd):

OnPush components that are created dynamically now only have their host bindings refreshed and ngDoCheck run during change detection if they are dirty. Previously, a bug in the change detection would result in the OnPush configuration of dynamically created components to be ignored when executing host bindings and the ngDoCheck function. This is rarely encountered but can happen if code has a handle on the ComponentRef instance and updates values read in the OnPush component template without then calling either markForCheck or detectChanges on that component's ChangeDetectorRef.

@proggler23
Copy link

any ETA on when Angular 17 will be supported?

We're currently having issues described by @janousek and would love to have an official solution, rather than a hacky workaround :)

@DaveMBush
Copy link

Regarding the above PR.

For those of you who'd like to get moving before this is merged and published, the main change is here:

https://github.com/Indigosoft/ngxd/pull/63/files#diff-43fa391336ab67ea0f7d5dbfb5aa792982bd96c3e92377fbe6edaa7fa418cde0R65-R69

I had to make a change to some of the test code because Angular now handles OnPush and Default change notification differently. That change is here: https://github.com/Indigosoft/ngxd/pull/63/files#diff-cfe523e683be6cacaebf3ed3129dd8d981995a7e9e3222281bda90f3062aa1b0L10-R23

The other changes are just upgrading to Angular 17

@diogogasparr
Copy link

Any ETA for the new release?

@diogogasparr
Copy link

@thekiba

@sergioorlov
Copy link

Any ETA for the new release? @diogogasparr @DaveMBush @thekiba

@bhuvangoradia
Copy link

Wanted to know if there is any update on this?

@diogogasparr
Copy link

was this project dropped?

@realbizkit
Copy link

Since Angular v16.2, this library is not needed anymore for probably the majority of the use cases:

  • Angular now supports input binding via ngComponentOutletInputs (outputs are not yet supported)
  • activated/deactivated events are missing but can be achieved with a workaround, for example: add one or more subject inputs to the dynamic component, then subscribe to them in the parent.

@DaveMBush
Copy link

@realbizkit, if you have a lot of legacy code that already uses this library, you still need it so you can make the transition.

Anyone who is using pnpm or yarn can patch the library with my fix that is still awaiting approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants