https://github.com/ryanve/togg
Angular UI toggle behavior directive
https://github.com/ryanve/togg
angular angular-directive angular-directives toggle toggles ui-components
Last synced: 11 months ago
JSON representation
Angular UI toggle behavior directive
- Host: GitHub
- URL: https://github.com/ryanve/togg
- Owner: ryanve
- License: mit
- Created: 2017-01-09T10:31:41.000Z (about 9 years ago)
- Default Branch: gh-pages
- Last Pushed: 2017-03-16T02:40:27.000Z (almost 9 years ago)
- Last Synced: 2025-03-15T21:51:23.758Z (11 months ago)
- Topics: angular, angular-directive, angular-directives, toggle, toggles, ui-components
- Language: HTML
- Homepage: https://ryanve.dev/togg/
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# togg
Angular UI directive to end all UI directives. Toggle classes, attributes, properties. Live your toggle dreams.
## [Interactive Examples](https://ryanve.github.io/togg/)
## Attributes
- `togg-scope`: applicable scope
- `togg-event`: event(s) to listen to
- `togg-class`: classes to toggle when event occurs
- `togg-attr`: attribute to toggle when event occurs
- `togg-prop`: property to toggle when event occurs
- `togg-state`: force state `true` or `false` from event target
- `togg-trigger` additional events to trigger when event occurs
- `togg-method`: jQuery method to invoke when event occurs
## Setup
#### [npm](https://www.npmjs.com/package/togg)
```
npm install togg --save
```
#### Declare dependency on your app
```js
angular.module('yourApp', ['togg'])
```
## Related
[Also available as a Vue directive](https://github.com/ryanve/v-togg)