fix(compiler): normalize the locale name (#18963)

PR Close #18963
This commit is contained in:
Victor Berchet 2017-08-30 16:46:30 -07:00 committed by Jason Aden
parent 8821723526
commit 497e0178cc

View File

@ -257,9 +257,10 @@ export class AotCompiler {
const providers: CompileProviderMetadata[] = [];
if (this._localeId) {
const normalizedLocale = this._localeId.replace(/_/g, '-');
providers.push({
token: createTokenForExternalReference(this._reflector, Identifiers.LOCALE_ID),
useValue: this._localeId,
useValue: normalizedLocale,
});
}