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

Commit cfe41d1

Browse files
author
Kamil Kisiela
committed
demo: add radio
1 parent afb9e00 commit cfe41d1

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

demo/client/data/examples/radio.js

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

0 commit comments

Comments
 (0)