Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.