ng-selectize
Angular (2,4,...) component for selectize.js
Hosted Example Site
Including within existing angular-cli project
npm i --save ng-selectize jquery selectize
- Add the following to the styles array within
angular.json
:
```javascript
"node_modules/selectize/dist/css/selectize.css",
"node_modules/selectize/dist/css/selectize.{your chosen theme}.css" // eg: .../selectize.bootstrap3.css
// (a semantic-ui theme has been added to node_modules/ng-selectize/assets/selectize.semantic.css if needed)
```
- Add the following to the scripts array within
angular.json
```javascript
"node_modules/jquery/dist/jquery.min.js",
"node_modules/ng-selectize/assets/selectize.standalone.js" // (or take from node_modules/selectize/dist/js/standalone/selectize.min.js)
```
- Import module within applicable
@NgModule
:
```javascript
import {NgSelectizeModule} from 'ng-selectize';
imports: [..., NgSelectizeModule, ...],
```
- Use within template:
<ng-selectize [config]="..." [options] = "..." {other-attributes}></ng-selectize>
Running the demo
```javascript git pull git@github.com:NicholasAzar/ng-selectize-demo.git cd ng-selectize-demo npm i npm start // navigate to localhost:4200 ```Docs
The docs directory within this repo is the result ofng build --prod --aot
from the ng-selectize-demo repository. It can be accessed from the hosted example site above.