angular-bootstrap-checkbox

WebJar for angular-bootstrap-checkbox

License

License

ISC
Categories

Categories

Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

angular-bootstrap-checkbox
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

angular-bootstrap-checkbox
WebJar for angular-bootstrap-checkbox
Project URL

Project URL

http://webjars.org

Download angular-bootstrap-checkbox

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/angular-bootstrap-checkbox/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>angular-bootstrap-checkbox</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/angular-bootstrap-checkbox/
implementation 'org.webjars.npm:angular-bootstrap-checkbox:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/angular-bootstrap-checkbox/
implementation ("org.webjars.npm:angular-bootstrap-checkbox:1.0.0")
'org.webjars.npm:angular-bootstrap-checkbox:jar:1.0.0'
<dependency org="org.webjars.npm" name="angular-bootstrap-checkbox" rev="1.0.0">
  <artifact name="angular-bootstrap-checkbox" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='angular-bootstrap-checkbox', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "angular-bootstrap-checkbox" % "1.0.0"
[org.webjars.npm/angular-bootstrap-checkbox "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

angular-bootstrap-checkbox

A checkbox for AngularJS styled to fit the Twitter Bootstrap standard design

Screenshot:

Screenshot

Description:

The standard checkboxes which use the input HTML element just don't look good in combination with Bootstrap.

Surprisingly, I could not find any nice looking, simple checkbox, so I built one. It is based on a button and Glyphicons which behaves like a normal checkbox.

The angular-bootstrap-checkbox is compatible to the use of the original AngularJS input[checkbox], with one minor change: while the original implementation allows an "uninitialized" or other then defined state of the model this one forces "false" or "ng-false-value" (not checked) when not set to "true" or "ng-true-value".

Installation via Bower:

$ bower install angular-bootstrap-checkbox --save

Usage:

Add "ui.checkbox" to your modules list. Then you can use it like AngularJS input[checkbox]:

<checkbox
    ng-model="checkboxModel"
    name="custom-name"              (Optional)
    ng-true-value="The Truth"       (Optional)
    ng-false-value="The Untruth"    (Optional)
    ng-change="onChange()"          (Optional)
></checkbox>

Additionally you can set the size:

<checkbox ...></checkbox>            (Normal size, corresponds to 'btn-xs')
<checkbox large ...></checkbox>      (Large, corresponds to 'btn-sm')
<checkbox larger ...></checkbox>     (Larger, corresponds to Button default size)
<checkbox largest ...></checkbox>    (Largest, corresponds to 'btn-lg')

Screenshot

And also style the checkboxes like Bootstrap buttons:

<checkbox class="btn-primary"></checkbox>    (Looks like primary button)
<checkbox class="btn-success"></checkbox>    (Looks like success button)
<checkbox class="btn-info"></checkbox>       (Looks like info button)
<checkbox class="btn-warning"></checkbox>    (Looks like warning button)
<checkbox class="btn-danger"></checkbox>     (Looks like danger button)

Screenshot

See index.html and app.js for examples and how it works.

Testing:

Start web server e.g. via Python:

$ python -m SimpleHTTPServer 8000

Start Karma E2E tests (has to be installed globally before):

$ karma start

License

Copyright (c) 2014 Sebastian Hammerl, Getslash GmbH

Licensed under the MIT License

org.webjars.npm

Catalant

Versions

Version
1.0.0