An open API service indexing awesome lists of open source software.

https://github.com/williamboman/angular-clock

[Angular 1.x] Useful clock directives & services for Angular
https://github.com/williamboman/angular-clock

Last synced: 5 months ago
JSON representation

[Angular 1.x] Useful clock directives & services for Angular

Awesome Lists containing this project

README

          

![angular-clock](angular-clock.gif)

*Useful clock directives & services for Angular*

## Dependencies
- [angular](https://github.com/angular/angular.js) ~1
- [moment](https://github.com/moment/moment/) ~2

## Install
### Bower
```bash
$ bower install angular-clock --save
```

Then simply just include the JavaScript file in your document!

## Usage
To use this Angular module, add `wb.angularClock` as a dependency in your Angular module.
```js
angular.module('yourApp', [..., 'wb.angularClock']);
```

### Directives
###### liveTime
Displays the current time, updating each second.

``

### Configuration
You can configurate this module through the `angularClock` provider. These are the default values;
- `format` - `DD.MM.YYYY HH:mm:ss`

The default format which will be used as a global default when outputting text representations of a timestamp/date. To change this: `angularClock.setFormat()`.

- `locale` - `en`

The default locale which will be used as a global default when outputting text representations of a date. To change this: `angularClock.setLocale()`.

## License
Licensed under the MIT license.

## Authors
**William Boman**