Simple pipe to angular2, returns the name of the month.
- First do it the download or clone of the repository and use the file
month-name.ts
in your project. - Import in your main module.
import { NgModule } from '@angular/core';
//...
import { MonthNamePipe } from '../pipes/month-name';
@NgModule({
imports: [],
declarations: [ MonthNamePipe ]
//...
})
export class AppModule {}
Return the name of the month.
<p> {{ monthNumber | month }} </p>