Last active
August 29, 2015 14:05
-
-
Save joshnuss/fc78daebb0a446b0437d to your computer and use it in GitHub Desktop.
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
// Example Angular.js form built with components (kind of like formtastic) | |
// `field`: supports text, number, email, checkbox, select, textarea, etc.. | |
// generates label and appropriate field type, withcheckmark/error icon when field is valid/invalid | |
.well | |
h1 Contact | |
super-form(name="contactForm" submit="send()") | |
field(model="message.email" type="email" required autofocus) | |
field(model="message.name" type="text" required) | |
field(model="message.topic" type="select" required options="topic as topic for topic in topics") | |
option(value="") -- choose -- | |
field(model="message.message" type="textarea" required) | |
submit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment