/ngx-toggle

Angular v2+ Bootstrap-styled Toggle

Primary LanguageJavaScriptMIT LicenseMIT

NG v2+ Toggle

npm version Build Status dependency Status devDependency Status Sauce Test Status

NPM

Angular v2+ Bootstrap-styled Toggle that can be used as a standalone toggle or can convert checkboxes into UI toggles.

Demo

View it in action at https://ngx-toggle.github.io

Dependencies

Installation

After installing the above dependencies, install ngx-toggle via:

npm install --save ngx-toggle

Import the main module into your project:

import {NgxToggleModule} from "ngx-toggle";

Import the module into your application:

import {NgxToggleModule} from "ngx-toggle";

@NgModule({
    ...
    imports: [NgxToggleModule, ...],
    ...
})
export class AppModule {
}

If you are using SystemJS, you should adjust your configuration to point to the UMD bundle.

In your systemJS config file, map needs to tell the System loader where to look for ngx-toggle:

map: {
   'ngx-toggle/ngx-toggle': 'node_modules/ngx-toggle/ngx-toggle/bundles/ngx-toggle.js' 
}

Supported browsers

We support the same browsers and versions supported by both Bootstrap 4 and Angular, whichever is more restrictive. See this for up-to-date Angular browser support.

  • Chrome (45+)
  • Firefox (40+)
  • IE (10+)
  • Edge (20+)
  • Safari (7+)

Also, check Bootstrap 4's notes on supported browsers.

Big Thanks

Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs