Skip to content

Constructor Injection Error #156

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
JesterXL opened this issue Jul 14, 2016 · 2 comments
Closed

Constructor Injection Error #156

JesterXL opened this issue Jul 14, 2016 · 2 comments

Comments

@JesterXL
Copy link
Contributor

JesterXL commented Jul 14, 2016

Getting an error Generic type 'NgRedux<RootState>' requires 1 type argument(s). when using the angular-cli starter with a simple constructor injection. Angular version 2.0.0-rc.3 and ng2-redux version 3.2.1-beta.1.

Basically same setup @SethDavenport has here. Tried ng2-redux version 3.2.0 but no dice with her either.

@e-schultz
Copy link
Member

import { IAppState } from './some/place';
class FooComponent {
  constructor(private ngRedux: NgRedux<IAppState>) {}
}

if you haven't defined an interface to describe you application state, could do

class FooComponent {
  constructor(private ngRedux: NgRedux<any>) {}
}

@JesterXL
Copy link
Contributor Author

Rad, that fixed it, thanks chief!

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

2 participants