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
- Host: GitHub
- URL: https://github.com/williamboman/angular-clock
- Owner: williamboman
- Created: 2014-08-15T09:57:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-20T20:21:45.000Z (about 11 years ago)
- Last Synced: 2025-03-10T09:37:32.958Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 199 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

*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**