Skip to content

Commit

Permalink
pipe de fecha con región del país y pipe personalizado
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Guzmán committed Feb 21, 2018
1 parent c2fe356 commit bfb69e0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -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 { }

0 comments on commit bfb69e0

Please sign in to comment.