https://github.com/chesleybrown/randomclass-directive
Very simple directive for randomizing a class on an element.
https://github.com/chesleybrown/randomclass-directive
Last synced: 10 days ago
JSON representation
Very simple directive for randomizing a class on an element.
- Host: GitHub
- URL: https://github.com/chesleybrown/randomclass-directive
- Owner: chesleybrown
- License: mit
- Created: 2014-02-13T13:38:31.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-13T13:56:25.000Z (over 11 years ago)
- Last Synced: 2025-06-07T12:46:45.877Z (28 days ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
randomclass-directive
=====================Very simple directive for randomizing a class on an element.
#### Install with Bower:
```
bower install randomclass-directive
```#### Include the directive in your Angular module:
```
var myApp = angular.module('myApp', ['randomclass-directive']);
```## Usage
Use the `random-class` directive on the element you want to apply a random class to. Also set the `classPrefix` as the prefix of your class. A random number will be appended to the class based on a range from the `min` and `max` you set.
```html
```