Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
angular-clock
Advanced tools
Responsive, beautiful clocks for AngularJS built using SVG
This repository contains native AngularJS directives to render a clock face. The only required dependencies are:
bower install angular-ui-clock --save
Alternatively files can be downloaded downloaded from Github.
and copy the files from dist/
. Then add the sources to your code (adjust paths as needed) after
adding the dependencies for Angular first:
<script src="../bower_components/angular/angular.min.js"></script>
<script src="/bower_components/angular-clock/dist/angular-clock.js"></script>
Whichever method you choose the good news is that the overall size is very small: < 4kb for all directives (~1kb with gzip compression!)
As soon as you've got all the files downloaded and included in your page you just need to declare a dependency on the ds.clock
module:
angular.module('myModule', ['ds.clock']);
You need to include a link to the css file in your page.
<link rel="stylesheet" href="bower_components/dist/angular-clock.css">
If you need the default digital clock font Syncopate
, include this. Else check styling section to use your own font
<link href='//fonts.googleapis.com/css?family=Syncopate:400,700' rel='stylesheet' type='text/css'>
There are several options that you can set as attributes on the directive element
start-time
: init clock with specific time in milliseconds, (default: undefined
)digital-format
: digital clock format in angular date filter format (default: 'HH-mm-ss'
). Pass as string enclosed in single quategmt-offset
: shows time for the given GMT offset in clock, (default: false
, shows local time) example: India -> 5.30, Singapore -> 8 , venezula -> -4.30, Nepal -> 5.45show-digital
: shows digital clock, (default: true
if both show-analog &show-digital are not set)show-analog
: shows analog clock, (default: true
if both show-analog &show-digital are not set)show-gmt-info
: shows GMT offset value, (default: false
)theme
: analog clockface theme, (default: light
)For IE8 and older browsers, you will need SVG polyfills and Shims
<ds-widget-clock theme="dark" show-secs="true" digital-format="'hh:mm:ss a'"></ds-widget-clock>
angular clock widget is reactive and fully responsive
Please check if issue exists and otherwise open issue in github
Please add a link to a plunker, jsbin, or equivalent.
Pull requests welcome!
npm test
, gulp test
Thank you!
Designed and built by Deepu K Sasidharan
Inspired from this demo.
angular-clock.js is available under the MIT license.
FAQs
An angular.js clock widget
The npm package angular-clock receives a total of 15 weekly downloads. As such, angular-clock popularity was classified as not popular.
We found that angular-clock demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.