Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng2-select

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-select - npm Package Compare versions

Comparing version 0.0.1 to 0.42.0

components/css/ng2-select.css

71

package.json
{
"name": "ng2-select",
"version": "0.0.1",
"description": "Angular2 based replacement for select boxes",
"main": "index.js",
"version": "0.42.0",
"description": "angular2 select component",
"scripts": {
"test": "npm test"
"deploy": "NODE_ENV=production webpack -p --progress --color --optimize-minimize --optimize-dedupe --optimize-occurence-order",
"prepublish": "gulp clean && tsc && mkdir -p dist/css && cp components/css/ng2-select.css dist/css",
"prestart": "npm install",
"server": "webpack-dev-server --hot --inline --colors --display-error-details --display-cached",
"start": "npm run server",
"test": "gulp lint"
},
"repository": {
"type": "git",
"url": "git+https://github.com/valor-software/ng2-select.git"
},
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"files": [
"dist",
"components"
],
"keywords": [
"angular2",
"ng2",
"select",
"angular2-select",
"ng2-select"
"bootstrap",
"angularjs",
"twitter-bootstrap"
],
"author": "Dmitriy Shekhovtsov <valorkin@gmail.com>",
"author": "Vyacheslav Chub <vyacheslav.chub@valor-software.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/valor-software/ng2-select.git"
},
"bugs": {
"url": "https://github.com/valor-software/ng2-select/issues"
},
"homepage": "https://github.com/valor-software/ng2-select#readme"
"homepage": "https://github.com/valor-software/ng2-select#readme",
"dependencies": {
"angular2": "2.0.0-alpha.42",
"ng2-bootstrap": "0.42.0",
"reflect-metadata": "0.1.2",
"ts-loader": "0.5.6",
"zone.js": "0.5.8"
},
"devDependencies": {
"bootstrap": "3.3.5",
"clean-webpack-plugin": "0.1.3",
"compression-webpack-plugin": "0.2.0",
"eslint": "1.6.0",
"exports-loader": "0.6.2",
"file-loader": "0.8.4",
"gulp": "3.9.0",
"gulp-clean": "0.3.1",
"gulp-eslint": "1.0.0",
"gulp-size": "2.0.0",
"gulp-tsc": "1.1.1",
"gulp-tslint": "3.3.1",
"html-loader": "0.3.0",
"markdown-loader": "0.1.7",
"marked": "0.3.5",
"moment": "2.10.6",
"pre-commit": "1.1.1",
"prismjs": "valorkin/prism",
"prismjs-loader": "0.0.2",
"raw-loader": "0.5.1",
"require-dir": "0.3.0",
"transfer-webpack-plugin": "0.1.4",
"typescript": "1.6.2",
"webpack": "1.12.2",
"webpack-dev-server": "1.12.0"
}
}
# ng2-select
Angular2 based replacement for select boxes
## Placeholder for `ng2-select` angular2 module
Native Select Angular2 component
Please read central `ng2` modules [readme](https://github.com/valor-software/ng2-plans) for details, plans and approach
## Quick start
1. A recommended way to install ***ng2-select*** is through [npm](https://www.npmjs.com/search?q=ng2-select) package manager using the following command:
`npm i ng2-select --save`
Alternatively, you can [download it in a ZIP file](https://github.com/valor-software/ng2-select/archive/master.zip).
2. Include `ng2-select.css` in your project
3. More information regarding of using ***ng2-select*** is located in
[demo](http://valor-software.github.io/ng2-select/) and [demo sources](https://github.com/valor-software/ng2-select/tree/master/demo).
## API
### Properties
- `items` - (`Array<any>`) - Array of items from which to select. Should be an array of objects with `id` and `text` properties.
As convenience, you may also pass an array of strings, in which case the same string is used for both the ID and the text.
Items may be nested by adding a `children` property to any item, whose value should be another array of items. Items that have children may omit having an ID.
If `items` are specified, all items are expected to be available locally and all selection operations operate on this local array only.
If omitted, items are not available locally, and the `query` option should be provided to fetch data.
- `data` (`?Array<any>`) - Initial selection data to set. This should be an object with `id` and `text` properties in the case of input type 'Single',
or an array of such objects otherwise. This option is mutually exclusive with value.
- `allowClear` (`?boolean=false`) (*not yet supported*) - Set to `true` to allow the selection to be cleared. This option only applies to single-value inputs.
- `placeholder` (`?string=''`) - Placeholder text to display when the element has no focus and selected items.
- `disabled` (`?boolean=false`) - When `true`, it specifies that the component should be disabled.
- `multiple` - (`?boolean=false`) - Mode of this component. If set `true` user can select more than one option.
This option only applies to single-value inputs, as multiple-value inputs don't have the search input in the dropdown to begin with.
### Events
- `data` - it fires during all events of this component; returns `Array<any>` - current selected data
- `selected` - it fires after a new option selected; returns object with `id` and `text` properties that describes a new option.
- `removed` - it fires after an option removed; returns object with `id` and `text` properties that describes a removed option.
- `typed` - it fires after changing of search input; returns `string` with that value.
# Troubleshooting
Please follow this guidelines when reporting bugs and feature requests:
1. Use [GitHub Issues](https://github.com/valor-software/ng2-select/issues) board to report bugs and feature requests (not our email address)
2. Please **always** write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.
Thanks for understanding!
### License
The MIT License (see the [LICENSE](https://github.com/valor-software/ng2-select/blob/master/LICENSE) file for the full text)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc