From bfb69e0b7da712fe91317dc8fdaba73b50978d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Guzm=C3=A1n?= Date: Wed, 21 Feb 2018 14:56:02 -0500 Subject: [PATCH] =?UTF-8?q?pipe=20de=20fecha=20con=20regi=C3=B3n=20del=20p?= =?UTF-8?q?a=C3=ADs=20y=20pipe=20personalizado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.module.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 926975a..7d92816 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,18 +1,26 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; +//Para trabajar con pipe de fechas con region de pais para que no esté por defecto en-US +import { LOCALE_ID } from '@angular/core'; +import { registerLocaleData } from '@angular/common'; +import localeEs from '@angular/common/locales/es-EC'; import { AppComponent } from './app.component'; +//importación de pipe personalizado +import { CapitalizadoPipe } from './pipes/capitalizado.pipe'; +registerLocaleData(localeEs); @NgModule({ declarations: [ - AppComponent + AppComponent, + CapitalizadoPipe ], imports: [ BrowserModule ], - providers: [], + providers: [{ provide: LOCALE_ID, useValue: 'es-EC' }], bootstrap: [AppComponent] }) export class AppModule { }