1.0.2 • Published 6 years ago

angular-date-interceptor v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

angular-date-interceptor


An AngularJS interceptor to parse dates from server response.

Codeship Status for ins87/angular-date-interceptor

The problem

By default, if you want to bind a model (which comes from the server) to a date input, you will get Error: [ngModel:datefmt] Expected 2015-07-25T11:40:35.395Z to be a date. The problem is that the date is in ISO 8061 string format and it is not a date object. This interceptor convert dates into date objects.

Installation

You can choose your preferred method of installation:

Usage

Include angular-date-interceptor.js in your application.

<script src="components/angular-date-interceptor/dist/angular-date-interceptor.js"></script>

Add the module angularDateInterceptor as a dependency to your module:

angular.module('myApp', ['angularDateInterceptor']);

License

Released under the terms of the MIT License.

1.0.2

6 years ago

1.0.1

8 years ago

1.0.0

10 years ago