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

Incompatible with @angular/core/core.umd.js #129

Closed
StephenLujan opened this issue May 19, 2016 · 2 comments
Closed

Incompatible with @angular/core/core.umd.js #129

StephenLujan opened this issue May 19, 2016 · 2 comments

Comments

@StephenLujan
Copy link

StephenLujan commented May 19, 2016

My project was using the gulp to place Angular bundles and systemjs to load them before Angular RC1. I tried to use the .umd.js files as a substitute for the bundles when RC1 released. I noticed everything seems to work fine but ng2-translate is not compatible if only the .umd.js file is used, throwing the following error:

zone.js:101 GET http://localhost:44355/lib/@angular/core/src/facade/lang.js 404 (Not Found)

I stripped the code down to this test file, to reproduce the error.

import { Http, HTTP_PROVIDERS } from '@angular/http';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {TranslateService, TranslateLoader, TranslateStaticLoader} from 'ng2-translate';
import {provide, Component} from '@angular/core';

@Component({
    selector: 'bug',
    providers: [],
    template: '<span>loaded template!</span>',
    directives: []
})
export class TranslateBug {
    constructor(private http: Http, _translationService: TranslateService) {}
}
bootstrap(
    TranslateBug,
    [
        HTTP_PROVIDERS,
        provide(TranslateLoader, {
            useFactory: (http: Http) => new TranslateStaticLoader(http, 'i18n', '.json'),
            deps: [Http]
        }),
        TranslateService
    ]
);
@StephenLujan
Copy link
Author

StephenLujan commented May 20, 2016

For now I've just copied that one extra file into place. @angular/core/src/facade/lang.js I haven't seen any other issues.

@ocombe
Copy link
Member

ocombe commented Jun 30, 2016

The methods from lang are not really necessary, I could rewrite the few that I use so that it works for all users. I'll add it to the todo list, thanks for the report.

@ocombe ocombe closed this as completed in 3ada3c1 Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants