You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NimbleRadioControlValueAccessorDirective extends RadioControlValueAccessor which depends on RadioControlRegistry which is no longer exported from @angular/forms in Angular 13 and 14.
💻 Repro or Code Sample
Upgrade to Angular 13, and run npm run build.
🤔 Expected Behavior
As outlined in #732, public API should not be extended unless explicitly documented as supported. In addition, RadioControlRegistry is private.
😯 Current Behavior
✖ Compiling with Angular sources in Ivy partial compilation mode.
projects/ni/nimble-angular/src/directives/radio/nimble-radio-control-value-accessor.directive.ts:3:56 - error TS2305: Module '"@angular/forms"' has no exported member 'ɵangular_packages_forms_forms_r'.
3 import { NG_VALUE_ACCESSOR, RadioControlValueAccessor, ɵangular_packages_forms_forms_r } from '@angular/forms';~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
projects/ni/nimble-angular/src/directives/radio/nimble-radio-control-value-accessor.directive.ts:28:86 - error NG2003: No suitable injection token for parameter '_registry' of class 'NimbleRadioControlValueAccessorDirective'.
Consider using the @Inject decorator to specify an injection token.
28 public constructor(renderer: Renderer2, private readonly elementRef: ElementRef, _registry: ɵangular_packages_forms_forms_r, _injector: Injector) {
)
# Pull Request
## 🤨 Rationale
Fixes#782
## 👩💻 Implementation
Copied several types from the Angular source base into the Nimble repo,
including:
- RadioControlValueAccessor
- RadioControlRegistry
- BaseControlValueAccessor
We're pulling in version 14.2.6 since we will soon be upgrading Nimble's
version of Angular. To make it work with version 12 in the meantime, I
made one small change to an error reporting function to throw an Error
rather than a RuntimeError. Throwing an Error is what it did in version
12.
## 🧪 Testing
Unit tests still pass
## ✅ Checklist
- [x] I have updated the project documentation to reflect my changes or
determined no changes are needed.
Co-authored-by: Milan Raj <rajsite@users.noreply.github.com>
Co-authored-by: Jonathan Meyer <jonathan.meyer@ni.com>
🐛 Bug Report
The NimbleRadioControlValueAccessorDirective extends RadioControlValueAccessor which depends on RadioControlRegistry which is no longer exported from @angular/forms in Angular 13 and 14.
💻 Repro or Code Sample
Upgrade to Angular 13, and run
npm run build
.🤔 Expected Behavior
As outlined in #732, public API should not be extended unless explicitly documented as supported. In addition, RadioControlRegistry is private.
😯 Current Behavior
💁 Possible Solution
🔦 Context
I am trying to upgrade Nimble to Angular 13 and 14.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: