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

This commit is contained in:
Victor Berchet 2017-08-30 17:33:26 -07:00 committed by GitHub
parent 4ec5e282d9
commit 043f104738
1 changed files with 2 additions and 1 deletions

View File

@ -229,9 +229,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,
});
}