ng2-select-view
v0.0.18
Published
Group of components to enhance the functionality of a select list. Influenced largely by the select2 project.
Downloads
6
Readme
Angular Select View
Group of components to enhance the functionality of a select list. Influenced largely by the select2 project.
Currently [email protected] will need to be installed along side this project and css included in your html for it to work.
Installation
npm install [email protected] ng2-select-view --save
Usage
In your html page
<!doctype html>
<html>
<head>
...
<link rel="stylesheet" href="node_modules/select2/select2.css" />
<link rel="stylesheet" href="node_modules/select2/select2-bootstrap.css" />
...
</head>
...
</html>
import {NgModule} from "@angular/core";
import {SelectViewModule} from "ng2-select-view/lib/select-view.module";
@NgModule({
...
imports: [
...,
SelectViewModule
],
...
})
export class AppModule { }
Somewhere in your project
<c-list-one [options]="[{key: '1', value: 'Hello', {key: '2', value: 'Goodbye'}}]" [(ngModel)]="myValue"></c-list-one>
<c-list-many [options]="[{key: '1', value: 'Hello'}, {key: '2', value: 'Goodbye'}]" [(ngModel)]="myListValue"></c-list-many>