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

fix inject problem #4

Merged
merged 1 commit into from
Mar 20, 2020
Merged

fix inject problem #4

merged 1 commit into from
Mar 20, 2020

Conversation

joebnb
Copy link
Contributor

@joebnb joebnb commented Feb 14, 2020

fix inject problem case like

export class AppComponent {
  constructor(public translate:TranslateService) {  // error
    translate.addLangs(['en', 'fr']);
    translate.setDefaultLang('en');

    const browserLang = translate.getBrowserLang();
    translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
  }
}

it will throw a error Can't resolve all parameters for AppComponent: (?)

quote:
thymikee/jest-preset-angular#288

fix inject problem case like
```
export class AppComponent {
  constructor(public translate:TranslateService) {  // error
    translate.addLangs(['en', 'fr']);
    translate.setDefaultLang('en');

    const browserLang = translate.getBrowserLang();
    translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
  }
}
```
it will throw a error Can't resolve all parameters for AppComponent: (?)

quote:
thymikee/jest-preset-angular#288
@nakul009 nakul009 merged commit 9ce88ab into nakul009:master Mar 20, 2020
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

Successfully merging this pull request may close these issues.

2 participants