1.0.4 • Published 6 years ago

ng-month v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Month

This is a small json file which containes months.

month json file

A small utility month json file which is used to bind month in a select control.

Installation instruction

In this section, I am going to explain how to install and use ng-month package

npm install ng-month --save

Please follow below instruction to use the package

How to use?

// in your component where you want to bind months
var monthjson = require('ng-month/month.json');

// in your component ts file
ngOnInit(){
	this.months = monthjson
}

// in  your component html file
<select class="form-control" [(ngModel)]="modalname">
	<option value="" selected disabled>Month</option>
	<option *ngFor="let month of months;" value="{{month.value}}">{{month.month}}</option>
</select>

// or 
<select class="form-control" [(ngModel)]="modalname">
	<option value="" selected disabled>Month</option>
	<option *ngFor="let month of months;" value="{{month.value}}">{{month.shortname}}</option>
</select>