Skip to content

Trouble with Dependency Injection #95

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

Closed
SparkValor opened this issue Feb 29, 2016 · 3 comments
Closed

Trouble with Dependency Injection #95

SparkValor opened this issue Feb 29, 2016 · 3 comments

Comments

@SparkValor
Copy link

I have some trouble with the dependency injection system. Every time I run my app I get the following error:

Error calling module function

ReferenceError: __param is not defined

I tried different things but couldn't get it to work.
Has anyone else have this problem? Am I missing something?

Cheers,
Nils

@NathanWalker
Copy link
Contributor

@SparkValor open the tsconfig.json and remove this line if present:

"noEmitHelpers": true  // bad for angular :(

That line will cause problems with angular di.
Additionally, make sure you have this added:

"emitDecoratorMetadata": true,  /// good for angular :)

@hdeshev
Copy link
Contributor

hdeshev commented Mar 1, 2016

Disabling noEmitHelpers is the best solution at the moment. Unfortunately that will emit helpers in all JS modules. We are fixing that by moving some of the helper definitions to the core NativeScript modules.

NativeScript/NativeScript#1675 fixes the __params problem.

@hdeshev hdeshev closed this as completed Mar 1, 2016
@SparkValor
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants