Skip to content

Commit

Permalink
fix(core/forms): classes using Angular features need to be decorated
Browse files Browse the repository at this point in the history
AjfTableFieldComponent and AjfVideoUrlFieldComponent were using `Inject` decorator in constructor but were not decorated with `Directive`
  • Loading branch information
trik committed Oct 13, 2021
1 parent e2cf7a9 commit b934078
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/core/forms/table-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
*/

import {ChangeDetectorRef, Inject} from '@angular/core';
import {ChangeDetectorRef, Directive, Inject} from '@angular/core';

import {AjfBaseFieldComponent} from './base-field';
import {AjfFormRendererService} from './form-renderer';
Expand All @@ -37,6 +37,7 @@ import {AJF_WARNING_ALERT_SERVICE, AjfWarningAlertService} from './warning-alert
* @abstract
* @class AjfTableFieldComponent
*/
@Directive()
export abstract class AjfTableFieldComponent extends AjfBaseFieldComponent<AjfTableFieldInstance> {
constructor(
cdr: ChangeDetectorRef, service: AjfFormRendererService,
Expand Down
3 changes: 2 additions & 1 deletion src/core/forms/video-url-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

import {HttpClient} from '@angular/common/http';
import {ChangeDetectorRef, Inject} from '@angular/core';
import {ChangeDetectorRef, Directive, Inject} from '@angular/core';
import {FormControl} from '@angular/forms';
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
import {Observable, of as obsOf} from 'rxjs';
Expand All @@ -44,6 +44,7 @@ interface VideoInfo {
* @export
* @class AjfVideoUrlFieldComponent
*/
@Directive()
export class AjfVideoUrlFieldComponent extends AjfBaseFieldComponent {
readonly validUrl: Observable<boolean>;
readonly videoThumbnail: Observable<SafeResourceUrl>;
Expand Down
8 changes: 8 additions & 0 deletions tools/public_api_guard/core/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,10 @@ export abstract class AjfTableFieldComponent extends AjfBaseFieldComponent<AjfTa
constructor(cdr: ChangeDetectorRef, service: AjfFormRendererService, was: AjfWarningAlertService);
goToCell(row: number, column: number): void;
goToNextCell(ev: Event, row: number, column: number): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<AjfTableFieldComponent, never, never, {}, {}, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<AjfTableFieldComponent, never>;
}

// @public
Expand Down Expand Up @@ -1244,6 +1248,10 @@ export class AjfVideoUrlFieldComponent extends AjfBaseFieldComponent {
readonly validUrl: Observable<boolean>;
// (undocumented)
readonly videoThumbnail: Observable<SafeResourceUrl>;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<AjfVideoUrlFieldComponent, never, never, {}, {}, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<AjfVideoUrlFieldComponent, never>;
}

// @public (undocumented)
Expand Down

0 comments on commit b934078

Please sign in to comment.