![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
angular2-select
Advanced tools
Select component for Angular 2 (based on select2 JQuery plugin).
A native select component for angular 2, based on the select2 JQuery plugin. The component is currently in alpha, so breaking changes are to be expected.
npm install --save angular2-select
In systemjs.config.js
add angular2-select
to map and package:
var map = {
// others...,
'angular2-select': 'node_modules/angular2-select'
};
var packages = {
// others...,
'angular2-select': {
main: 'index.js',
defaultExtension: 'js'
}
};
To use the select components in one of your components, import the
SELECT_DIRECTIVES
with:
import {SELECT_DIRECTIVES} from 'angular2-select';
Add the following HTML to your component's template to include the select component:
<ng-select
[options]="options">
</ng-select>
And add the SELECT_DIRECTIVES
to the list of directives.
Within your component's class you can set the list of select options. This must be a list of objects, with for each object a value (option identifier) and a label (which the user sees in the select drop down).
export class YourComponent {
options = [
{
value: 'a',
label: 'Alpha'
},
{
value: 'b',
label: 'Beta'
},
{
value: 'c',
label: 'Gamma'
}
];
}
Next to the obligatory options
parameter, the ng-select
tag supports the
following optional parameters:
<ng-select
[options]="options"
placeholder="Select an option"
allowClear="true"
theme="default">
</ng-select>
The optional parameters can also be bound to a variable in the component's class.
<ng-select
[options]="options"
[placeholder]="placeholder"
[allowClear]="canClearSelect"
theme="default">
</ng-select>
export class YourComponent implements {
placeholder: string = 'Select an option';
canClearSelect: boolean = true;
// ...
}
Optional parameters will be set to their default value if they are not defined
in the ng-select
tag.
default: ''
The placeholder value is shown if no option is selected.
default: 'false'
If set to true, a button with a cross that can be used to clear the currently selected option is shown if an option is selected.
default: 'default'
Currently the original select2
CSS is used, which allows you to select between
to themed looks, default
and classic
.
Select2 features that are currently not supported are:
Clone or fork the repository and run:
npm install
gulp build
IMPORTANT Building with gulp build
currently only works with node version
6, due to an issue in one of gulp-typescript
's dependencies (beautylog).
1.0.0-beta.0 (2017-01-07)
ngStyle
(#59).open
and close
to open/close drop down from ts (#43).onTouched
when focus on select component (#24).<a name="1.0.0-alpha.12"></a>
FAQs
Select component for Angular2.
The npm package angular2-select receives a total of 0 weekly downloads. As such, angular2-select popularity was classified as not popular.
We found that angular2-select 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.