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

Commit 2f15c2c

Browse files
author
Kamil Kisiela
committed
demo: add switch
1 parent 019d54a commit 2f15c2c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

demo/client/data/examples/switch.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const { SetModule } = angular2now;
2+
3+
SetModule('demo').run(['Examples', 'Menu', (Examples, Menu) => {
4+
const fields = [];
5+
6+
fields.push({
7+
type: 'switch',
8+
key: 'terms',
9+
templateOptions: {
10+
label: 'Terms and conditions'
11+
}
12+
});
13+
14+
// set example
15+
Examples.set('switch', {
16+
fields
17+
}, 'types/switch.md');
18+
19+
// add menu item to types
20+
Menu.addChild('types', 'switch');
21+
}]);

0 commit comments

Comments
 (0)