
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
ngx-input-switch
Advanced tools
To install this library, run:
npm install ngx-input-switch --save
and then from your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { NgxInputSwitchModule } from 'ngx-input-switch';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
ReactiveFormsModule,
NgxInputSwitchModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Once the library is imported, you can use the ngx-input-switch
component.
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
import { Observable } from 'rxjs/Observable';
@Component({
selector: 'app-root',
template: `
<h1>ngx-input-switch</h1>
<form [formGroup]="form" (ngSubmit)="submit()">
<ngx-input-switch formControlName="switch"></ngx-input-switch>
<button>Submit</button>
</form>
`
})
export class AppComponent implements OnInit {
form: FormGroup;
value: Observable<number>;
constructor(private formBuilder: FormBuilder) { }
ngOnInit() {
this.form = this.formBuilder.group({
switch: [true]
});
this.value = this.form.controls.switch.valueChanges;
}
submit() {
console.log(this.form.value);
}
}
MIT © Cory Rylan
FAQs
## [Demo](https://stackblitz.com/edit/angular-vow9um)
The npm package ngx-input-switch receives a total of 14 weekly downloads. As such, ngx-input-switch popularity was classified as not popular.
We found that ngx-input-switch 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.