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

"Can't resolve all parameters for" when calling deserialize method #34

Open
pierre03 opened this issue Dec 4, 2017 · 1 comment
Open

Comments

@pierre03
Copy link

pierre03 commented Dec 4, 2017

I want to parse the josn to some classes, but when i called deserialize method in component "content" like:

  let content = {"data" : 10};
  const response = deserialize(SearchResponse, content);

And the SearchResponse is defined as:

export class ResearchResponse{
  data: number;
  constructor(){ this.data = void 0;}
}

I got an error for the component "Menu", in which i have also a class to define all the menus without json data but like this in hard:

this.menus = [
   new Menu(1, 'search');
  new Menu(2, 'result');
]

If i comment the call to deserialize function, the error will disapear.
This is the Error: Uncaught error: Can't resolve all parameters for MenuComponent; (?).
Any one can help me?

@antimoroma
Copy link

Same problem here, calling deserialize cause
Can't resolve all parameters for

"@angular/cli": "1.4.3",

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