
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
angular-bootstrap-checkbox-group
Advanced tools
Simple checkbox group for Angular & Bootstrap app.
Angular library for the simple checkbox group element(s).
npm i angular-bootstrap-checkbox-group
You should have installed Bootstrap in your app and then in your
module's metadata, include AngularBootstrapCheckboxGroupModule
in the
imports
array.
import { NgModule } from '@angular/core';
import { AngularBootstrapCheckboxGroupModule } from 'angular-bootstrap-checkbox-group';
@NgModule({
imports: [
AngularBootstrapCheckboxGroupModule
]
})
<!-- some.component.html -->
<checkbox-group
[(values)]="values"
[options]="optionsArrayOfString"
[disabled]="disabled"
[titleCaseOptions]="true"
(allState)="handleAllClick($event);"
(getClickedOptionKeyState)="handleOptionStateChange($event.key, $event.state);"
></checkbox-group>
<h5>Pizza for delivery:</h5>
[<span *ngFor="let value of values; index as i">'{{ value }}'{{ i !== values.length - 1 ? ", " : "" }}</span>]
<button *ngIf="!disabled" (click)="disabled = !disabled" class="btn btn-secondary">Disable</button>
<button *ngIf="disabled" (click)="disabled = !disabled" class="btn btn-primary">Enable</button>
// some.component.ts
export class MyComponent {
public disabled: boolean = false;
public readonly values: Array<string> = [];
public optionsArrayOfString: Array<string> = [
"neapolitan",
"california style",
"chicago deep dish",
"new york thin crust"
];
public optionsTupples: Array<[string, string]> = [
['neapolitan', 'Neapolitan'],
['california style', 'California Style'],
['chicago deep dish', 'Chicago Deep Dish'],
['new york thin crust', 'New York Thin Crust']
];
public optionsObject: { [key: string]: string } = {
'neapolitan': 'Neapolitan',
'california style': 'California Style',
'chicago deep dish': 'Chicago Deep Dish',
'new york thin crust': 'New York Thin Crust'
};
public handleAllClick = (state: boolean): void => console.log(`state: ${state}`);
public handleOptionStateChange(key: string, state: boolean): void {
console.log(`key: ${key} - state: ${state}`);
}
}
This library is using Angular 8.2 and tested on the host Angular app in which Bootstrap 4.3.1 was installed.
Attributes for <checkbox-group></checkbox-group>
element:
Attribute | Decorator | Type | Optional | Default Value |
---|---|---|---|---|
disabled | Input | boolean | True | false |
values | Input | Array<string | number> | False | undefined |
valuesChange | Output | EventEmitter<Array<string | number>> | True | EventEmitter instance |
options | Input | Array<string | number> | False | undefined |
options | Input | Array<[string | number, string | number]> | False | undefined |
options | Input | { [key: string]: string | number } | False | undefined |
titleCaseOptions | Input | boolean | True | false |
allState | Output | EventEmitter | True | EventEmitter instance |
getClickedOptionKeyState | Output | EventEmitter<{ key: string | number, state: boolean }> | True | EventEmitter instance |
FAQs
Simple checkbox group for Angular & Bootstrap app.
We found that angular-bootstrap-checkbox-group demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.