filestack / filestack-angular

An official angular component library for the Filestack
MIT License
9 stars 10 forks source link

Examples don't work #15

Open souvenirpixels opened 3 years ago

souvenirpixels commented 3 years ago

Steps to reproduce:

clone then run ng build filestack-angular. Then got the following errors. I also cut and paste code into a blank project and most example didn't work. I did get one example working with ng-picker-overlay but was not able to set options from FilestackModule.forRoot({ apikey: 'APIkey' }, options) as documented. Is this the only Angular example code? Is there anything that is more up to date and working with current versions?

Compiling TypeScript sources through ngc ERROR: projects/filestack-angular/src/lib/picker/pickerBase.component.ts:14:23 - error NG2007: Class is using Angular features but is not decorated. Please add an explicit Angular decorator.

14 export abstract class PickerBaseComponent implements OnInit, OnDestroy {

projects/filestack-angular/src/lib/picker/pickerOverlay.component.ts:18:14 - error NG2006: The component PickerOverlayComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @Directive decorator to PickerBaseComponent, or add an explicit constructor to PickerOverlayComponent.

18 export class PickerOverlayComponent extends PickerBaseComponent implements AfterContentInit {

projects/filestack-angular/src/lib/picker/pickerInline.component.ts:13:14 - error NG2006: The component PickerInlineComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @Directive decorator to PickerBaseComponent, or add an explicit constructor to PickerInlineComponent.

13 export class PickerInlineComponent extends PickerBaseComponent implements AfterContentInit {

projects/filestack-angular/src/lib/picker/pickerDropPane.component.ts:10:14 - error NG2006: The component PickerDropPaneComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @Directive decorator to PickerBaseComponent, or add an explicit constructor to PickerDropPaneComponent.

10 export class PickerDropPaneComponent extends PickerBaseComponent implements AfterContentInit {

An unhandled exception occurred: projects/filestack-angular/src/lib/picker/pickerBase.component.ts:14:23 - error NG2007: Class is using Angular features but is not decorated. Please add an explicit Angular decorator.

14 export abstract class PickerBaseComponent implements OnInit, OnDestroy {

projects/filestack-angular/src/lib/picker/pickerOverlay.component.ts:18:14 - error NG2006: The component PickerOverlayComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @Directive decorator to PickerBaseComponent, or add an explicit constructor to PickerOverlayComponent.

18 export class PickerOverlayComponent extends PickerBaseComponent implements AfterContentInit {

projects/filestack-angular/src/lib/picker/pickerInline.component.ts:13:14 - error NG2006: The component PickerInlineComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @Directive decorator to PickerBaseComponent, or add an explicit constructor to PickerInlineComponent.

13 export class PickerInlineComponent extends PickerBaseComponent implements AfterContentInit {

projects/filestack-angular/src/lib/picker/pickerDropPane.component.ts:10:14 - error NG2006: The component PickerDropPaneComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @Directive decorator to PickerBaseComponent, or add an explicit constructor to PickerDropPaneComponent.

10 export class PickerDropPaneComponent extends PickerBaseComponent implements AfterContentInit {

See "C:\Users\james\AppData\Local\Temp\ng-BNPSC9\angular-errors.log" for further details.

vdias38 commented 3 years ago

To make it working add @directive decorator and its import on projects/filestack-angular/src/lib/picker/pickerBase.component.ts