-
Notifications
You must be signed in to change notification settings - Fork 12k
enum in separate file throws runtime error when built with AOT #10983
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
Comments
I am getting the same error. If I run |
@dsoltesz according to https://github.com/angular/angular-cli/issues/10655, setting the |
Doesn’t that kinda negate the benefits of using aot? |
@dsoltesz Yep. I guess we will have to turn it off until they fix it. |
is anyone going to look at this...seems to be a pretty big regression, enums not working in AOT? |
This is a breaking change from past releases. Is there any target build that this will be addressed? Or any work around for the time being? |
set |
this does work but obviously lose that optimization...hopefully someone will fix this. |
Heya, does this still happen with the latest 6.0.x releases? |
Actually, I'm going to close in favor of #10655. It seems to be the exact same thing but there's some more information and a better repro there. |
this didn't start happening until we upgraded to 6.0.x |
ok, will subscribe to that post, thanks |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
Repro steps
On opening the resulting webpage i receive Cannot read property 'none' of undefined errors. Those errors result from undefined enums at runtime.
Very much simplified example (with 2 separate files)
action-type.enum.ts (enum in separate file)
export enum eActionType {
none,
actionA
...
}
test.component.ts (component in separate file)
import { eActionType } from './action-type.enum';
@component({ ... })
export class Test {
Observed behavior
Desired behavior
enum should not be undefined
The text was updated successfully, but these errors were encountered: