This repository has been archived by the owner on Jan 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kamil Kisiela
committed
Jan 19, 2016
1 parent
afb9e00
commit cfe41d1
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const { SetModule } = angular2now; | ||
|
||
SetModule('demo').run(['Examples', 'Menu', (Examples, Menu) => { | ||
const fields = []; | ||
|
||
fields.push({ | ||
type: 'radio', | ||
key: 'name', | ||
templateOptions: { | ||
label: 'Name', | ||
labelProp: 'firstName', | ||
valueProp: 'id', | ||
options: [ | ||
{ | ||
firstName: 'Sarah', | ||
id: 1 | ||
}, | ||
{ | ||
firstName: 'Jessica', | ||
id: 2 | ||
}, | ||
{ | ||
firstName: 'Parker', | ||
id: 3 | ||
} | ||
] | ||
} | ||
}); | ||
|
||
// set example | ||
Examples.set('radio', { | ||
fields | ||
}, 'types/radio.md'); | ||
|
||
// add menu item to types | ||
Menu.addChild('types', 'radio'); | ||
}]); |