Control markup
Hi, Thanks for this, it is working very well so far. My problem is that I'm not sure if and how I can control the output markup to play well with my app, based on ionic. That means that instead of:
<label>
First Name
<input type="text" name="first" ng-model="formData['first']" class="ng-pristine ng-valid">
</label>
I would like to have
<label class="item item-input">
<span class="input-label">First Name</span>
<input type="text" placeholder="First Name" ... >
</label>
How would I approach this? Thanks
Some of that can be done by simply using the appropriate keys in the JSON template to generate the desired attributes on the <input> tags, but wrapping the label text in a <span> is currently not supported. You could try including the <span> in the label key, but I think Angular will probably escape the < and >. However, it would probably be a good idea to implement a better templating mechanism that would support such things natively. I can't give a timetable at the moment, though.
Perhaps someone would be willing to put together a PR?
Hey is this feature supported yet ? This project works awesome for me , but i would like to out put my input types something like this `
No. It isn't.
Okay Thanks for the reply! Anyway I can include other element between two inputs ?
Any unrecognized type is converted to a <span>, and all other properties of that unknown field are converted to attributes (except label, which becomes the text content of the tag). So {"type":"span","class":"clearfix"} would insert <span class="clearfix"></span>. Other than that, no; such functionality is beyond the scope of this project.
Okay cool Thanks !