javascript - Generating form inputs in AngularJS with non-uniform structure -


i'm trying generate form each entry rule either enabled or disabled.

i want like:

[x] color blue [x] size @ least [ 50 ] [x] speed @ least [ 20 ] [ 7 ] [ minutes ]  [ submit ] 

where [x] denotes checkbox [ number ] spinbox/edit , [ text ] listbox.

i want generate ruleset template. main question how non-uniform template expansion better done in angularjs? suitable @ kind of tasks?

the source model looks (coffeescript syntax brevity):

color_blue:    template: "color {{color}}"   params:     color:        type: "list"       values: ["red", "blue" ]       default: 1  size_at_least:   template: "size @ least {{size}}"   params:     size:        type: "number"       min: 30       max: 60       default: 50 speed_at_least:   template: "speed @ least {{speed}} {{time}} {{time_units}}"   params:     speed:        type: "number"       min: 0       max: 60       default: 0     time:        type: "int"       min: 0       max: 20       default: 7     unit:        type: "list"       values: ["seconds", "minutes", "hours" ]       default: 1 

i can use jquery , generate these rules i'm learning angularjs , prefer learn practical task.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -