Skip to content
This repository was archived by the owner on Jan 22, 2018. It is now read-only.

Commit 957360b

Browse files
author
Kamil Kisiela
committed
demo: add select
1 parent cfe41d1 commit 957360b

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

demo/client/data/examples/select.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
const { SetModule } = angular2now;
2+
3+
SetModule('demo').run(['Examples', 'Menu', (Examples, Menu) => {
4+
const fields = [];
5+
6+
fields.push({
7+
type: 'select',
8+
key: 'names',
9+
templateOptions: {
10+
label: 'Names',
11+
multiple: true,
12+
labelProp: 'firstName',
13+
valueProp: 'id',
14+
options: [
15+
{
16+
firstName: 'Sarah',
17+
id: 1
18+
},
19+
{
20+
firstName: 'Jessica',
21+
id: 2
22+
},
23+
{
24+
firstName: 'Parker',
25+
id: 3
26+
}
27+
]
28+
}
29+
});
30+
31+
// set example
32+
Examples.set('select', {
33+
fields
34+
}, 'types/select.md');
35+
36+
// add menu item to types
37+
Menu.addChild('types', 'select');
38+
}]);

0 commit comments

Comments
 (0)