Closed andzhik closed 7 years ago
Is your TranslateService provider undefined ? It seems to be the same issue as the #120 ...
@andzhik maybe this will help you https://github.com/ocombe/ng2-translate/issues/120#issuecomment-224127374
@matthieubouvierthales , yes, TranslateService is undefined. @Shootervm , no, that doesn't help.
It seems to be the same issue as me.
I found a solution (workaround?):
<script src="angular2/ng2-translate/bundles/ng2-translate.js"></script>
import { TranslatePipe, TranslateService, TRANSLATE_PROVIDERS } from 'ng2-translate';
[...]
@Component({
...
providers: [..., TRANSLATE_PROVIDERS, ...],
pipes: [TranslatePipe]
...
}
[...]
export class AppComponent {
constructor(..., private _translateService: TranslateService, ...) {}
[...]
}
Do you still have this issue ? Is there some kind of example plunkr or github/gist repo that I could use to reproduce the bug ?
Closing this old issue, let me know if I should reopen it.
I have TypeError: Cannot read property 'toString' of undefined(…) on bootstrap. Looks similar to issue #108, but with different versions and no gulp.
I'm on Angular 2 rc1 and ng2-translate 2.1.
Issue was there for my project with Angular 2 beta 17 and ng2-translate 1.11, but ng2-play worked fine.
boot.ts:
systemjs.config.js (not sure if it matters):
If I have breakpoint in boot.js, in the setter for ng2_translate:
ng2_translate_1_1 is "almost" empty: