Nebulous Program Mechanic

    click-class

    0.1.3 • Public • Published

    click-class

    Angular click-class directive

    Demo

    Toggle class on clicked element

    <button class="button" click-class="button--toggled">Toggle</button>

    Toggle class on target element(s)

    <button class="button" click-class='{".target": "target--toggled"}'>Toggle</button>

    Setup

    Install via npm

    npm install click-class --save
    

    Declare dependency on your app

    angular.module('yourApp', ['clickClass'])

    Or define the directive on your app

    angular.module('yourApp', []).directive('clickClass', require('click-class'))

    Develop

    npm test
    

    Install

    npm i click-class

    DownloadsWeekly Downloads

    2

    Version

    0.1.3

    License

    MIT

    Last publish

    Collaborators

    • ryanve