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

Export standalone array from a library doesn't work in application #24327

Closed
1 task
ArielGueta opened this issue Nov 27, 2022 · 2 comments
Closed
1 task

Export standalone array from a library doesn't work in application #24327

ArielGueta opened this issue Nov 27, 2022 · 2 comments

Comments

@ArielGueta
Copy link

Command

other

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

I'm building a library with the angular-cli and export an array of standalone components:

export const libImports = [FooComponent, BarComponent]

When installing and consuming the export via npm:

import { libImports } from '@mylib/name';

@Component({
  standalone: true,
  imports: [libImports]
})
export class AppComponent {}

I get the error:

Value at position 4 in the AppComponent.imports of AppComponent is not a class
  Value is a reference to 'libImports'.

 export declare const libImports: (typeof FooComponent | typeof BarComponent)[];

Minimal Reproduction

Create a library and do the same.

Exception or Error

No response

Your Environment

v14, v15

Anything else relevant?

No response

@JoostK
Copy link
Member

JoostK commented Nov 27, 2022

Please follow angular/angular#48089. Closing as duplicate.

@JoostK JoostK closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2022
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants