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

Commit

Permalink
demo: add radio
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela committed Jan 19, 2016
1 parent afb9e00 commit cfe41d1
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions demo/client/data/examples/radio.js
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');
}]);

0 comments on commit cfe41d1

Please sign in to comment.