{"id":20008110,"url":"https://github.com/ovsleep/bootstrap-switch","last_synced_at":"2025-10-08T03:28:00.114Z","repository":{"id":57179498,"uuid":"71744860","full_name":"ovsleep/bootstrap-switch","owner":"ovsleep","description":"This is a Angular 2 Component to add a switch like input.","archived":false,"fork":false,"pushed_at":"2017-11-29T20:43:22.000Z","size":91,"stargazers_count":8,"open_issues_count":12,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-10T08:38:15.424Z","etag":null,"topics":["angular","angular4","bootstrap","bootstrap-switch","switch"],"latest_commit_sha":null,"homepage":"https://bootstrap-switch.herokuapp.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ovsleep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-24T02:31:24.000Z","updated_at":"2020-06-09T19:51:00.000Z","dependencies_parsed_at":"2022-09-14T02:10:33.314Z","dependency_job_id":null,"html_url":"https://github.com/ovsleep/bootstrap-switch","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/ovsleep/bootstrap-switch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovsleep%2Fbootstrap-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovsleep%2Fbootstrap-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovsleep%2Fbootstrap-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovsleep%2Fbootstrap-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ovsleep","download_url":"https://codeload.github.com/ovsleep/bootstrap-switch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovsleep%2Fbootstrap-switch/sbom","scorecard":{"id":715585,"data":{"date":"2025-08-11","repo":{"name":"github.com/ovsleep/bootstrap-switch","commit":"f5ec0316311c431c1a6993e4d0557bed7f516dec"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 2/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T09:32:20.616Z","repository_id":57179498,"created_at":"2025-08-22T09:32:20.616Z","updated_at":"2025-08-22T09:32:20.616Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278424862,"owners_count":25984679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular4","bootstrap","bootstrap-switch","switch"],"created_at":"2024-11-13T07:08:29.814Z","updated_at":"2025-10-08T03:28:00.082Z","avatar_url":"https://github.com/ovsleep.png","language":"TypeScript","readme":"# Angular 2 Bootstrap Switch\n\n\nThis is a Angular 2 Component to add a switch like input. It's basically an Angular 2 port for this: [Bootstrap-Switch](http://www.bootstrap-switch.org/).\n\n### Update 0.2\nI'm using a Yeoman generator to create the library now [link](https://github.com/jvandemo/generator-angular2-library). This resolves the \"ng build --prod\" issue, but you need to change a few things when importing the component if you used a previous version.\n\n### Installation\n\n```sh\n$ npm install --save angular2-bootstrap-switch\n```\nInstall animations package:\n```sh\n$ npm install @angular/animations --save\n```\n\nThen, add it to your `app.module`\n```ts\n...\nimport { BootstrapSwitchModule } from 'angular2-bootstrap-switch';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n\n@NgModule({\n  imports:      [\n    ...\n    BootstrapSwitchModule.forRoot(),\n    BrowserAnimationsModule\n    ],\n  declarations: [\n    ...\n  ],\n  bootstrap:    [ AppComponent ]\n})\nexport class AppModule { }\n```\n\nFor styling purposes, you should add the Bootstrap stylesheet to your `index.html`\n```html\n    \u003clink rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\"\u003e\n```\n\n### Usage\nIn your component template you just need to add the \u003cswitch\u003e\u003c/switch\u003e component with the bindings you want. Like this:\n```html\n\u003cswitch\n    [status]=\"value\"\n    [onText]=\"onText\"\n    [offText]=\"offText\"\n    [onColor]=\"onColor\"\n    [offColor]=\"offColor\"\n    [size]=\"size\"\n    [disabled]=\"disabled\"\n    (statusChange)=\"onFlagChange($event)\"\u003e\u003c/switch\u003e\n```\nAll the attributes are optional.\n\n`status`:  The current status of the switch (true|false). This is a two way binding\n\n`onText`:  The text to show on the ON label of the switch\n\n`offText`:  The text to show on the OFF label of the switch\n\n`onColor`:  The color of the ON label of the switch (\"blue\"|\"default\"|\"gray\"|\"green\"|\"red\"|\"sky-blue\"|\"yellow\")\n\n`offColor`:  The color of the OFF label of the switch (\"blue\"|\"default\"|\"gray\"|\"green\"|\"red\"|\"sky-blue\"|\"yellow\")\n\n`size`: The size of the switch (\"mini\"|\"small\"|\"normal\"|\"large\")\n\n`disabled`: Boolean value to enable/disabled the switch\n\nEvents:\n\n`statusChange`: Event fired on status change\n\n### Example\nTo see the component in action, here's a demo page: [Demo](https://bootstrap-switch.herokuapp.com/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovsleep%2Fbootstrap-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovsleep%2Fbootstrap-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovsleep%2Fbootstrap-switch/lists"}