Closed musahaidari closed 7 years ago
I had similar errors with lambdas. Converted them to ordinary functions, and errors gone.
@tsabirgaliev I have lambdas too, but when I remove the static providers, then it compiles too, even with lambdas.
This issue tracker is for issues related to angular-cli
, not the AoT compiler in general. Stack overflow is the best bet for this sort of questions.
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.
OS?
Versions.
Summary: I am trying to use Angular2 AoT for my Angular2 application, but since I have static providers to pass some values from server to Angular2,
ngc
shows some errors. My problem is how to get thengFactory
files created usingngc
.Details: I am using the cookbook guide, and running
"node_modules/.bin/ngc" -p tsconfig-aot.json
shows me the below error:tsconfig-aot.json:
package.json:
index.pug:
main.ts:
app.module.ts:
app.component.ts:
Notes:
createMainModule()
in app.module.ts, and so on, thenngc
works fine.