Skip to content

snirs90/ng-styled-checkbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ng-checkbox

Styled checkbox with an AngularJS directive

Getting Started

Add script source into your project

<script src="js/app.js"></script>

Documentation

To add a styled checkbox:

<input type="checkbox" value="1" styled-checkbox ng-click="toggleCheckbox()" ng-checked="checkbox"  />

Attribute options:

  • layout="rounded" - to change the checkbox layout.
  • checked - to check the checkbox by default.

In order to change a layout you need an html file inside js/directives/styled-checkbox

named checkbox-*.html where * is your layout name (e.g. checkbox-rounded).

The file should contain:

<div class="your-css-class" ng-click="toggleCheckbox()"></div>

where class is your css class with your unique style.

The css should contain also a checked class that will s append when the checkbox is checked so the checkbox will look as checked.

Thats it!

About

An angular directive that make a custom style of checkbox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published