Bastien Donjon

Développeur web à Bordeaux

Friday

9

September 2016

0

COMMENTS

Set local default on your Angular 2 RC6 app

Written by , Posted in Javascript, typescript

Juste set LOCALE_ID in your app.module.ts file :

import {NgModule, ReflectiveInjector, LOCALE_ID}      from '@angular/core';

@NgModule({
imports: [
BrowserModule,
FormsModule,
HttpModule,
routing
],
declarations: [
AppComponent,
],
providers: [
{provide: LOCALE_ID, useValue: 'fr-FR'},
BaseRequestOptions
],
bootstrap: [AppComponent]
})