1.0.1 • Published 9 years ago
lanata-select v1.0.1
Install
package.json
"dependencies": {
"lanata-select": "<version>"
}
module
import { LanataSelectModule } from 'lanata-select';
@NgModule({
imports: [
...,
LanataSelectModule
],
...
});
Usage
component
import { Component } from '@angular/core';
import { Item } from 'lanata-select';
@Component({
selector: 'my-app',
template: `
<h1>Test</h1>
<lanata-select
[type]="'simple'"
[items]='simpleCollect'
[placeholder]="'Testtext'"
(selected)='simpleSelected($event)'>
</lanata-select>
<lanata-select
[type]="'group'"
[items]='groupCollect'
[placeholder]="'Testtext'"
(selected)='groupSelected($event)'>
</lanata-select>
`
})
export class AppComponent {
private simpleCollect: Array<any> = [
{ text: 'alma' },
{ text: 'bamba' },
{ text: 'Cecília' }
]
public simpleSelected(item: Item) {
console.log(item.text);
}
private groupCollect: Array<any> = [
{
text: 'alma',
childs: [
{ text: 'a' },
{ text: 'b' }
]
},
{
text: 'alma',
childs: [
{ text: 'a' },
{ text: 'b' }
]
}
]
public groupSelected(item: Item) {
console.log(item.text);
}
}
1.0.1
9 years ago
1.0.0
9 years ago
1.0.0-rc.10
9 years ago
1.0.0-rc.9
9 years ago
1.0.0-rc.7
9 years ago
1.0.0-rc.6
9 years ago
1.0.0-rc.5
9 years ago
1.0.0-rc.4
9 years ago
1.0.0-rc.3
9 years ago
1.0.0-rc.2
9 years ago
1.0.0-rc.1
9 years ago
1.0.0-SNAPSHOT
9 years ago