Created
February 6, 2014 21:51
-
-
Save keithio/8853212 to your computer and use it in GitHub Desktop.
Usage for angular-mailchimp.js
This file contains hidden or 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
<form name="MailchimpSubscriptionForm" ng-controller="MailchimpSubscriptionCtrl"> | |
<div ng-hide="mailchimp.result === 'success'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.username" ng-init="mailchimp.username='username'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.dc" ng-init="mailchimp.dc='us1'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.u" ng-init="mailchimp.u='a1b2c3d4e5f6g7h8i9j0'"> | |
<input class="hidden" type="hidden" ng-model="mailchimp.id" ng-init="mailchimp.id='aabb12'"> | |
<input type="text" name="fname" ng-model="mailchimp.fname" placeholder="First name"> | |
<input type="text" name="lname" ng-model="mailchimp.lname" placeholder="Last name"> | |
<input type="email" name="email" ng-model="mailchimp.email" placeholder="Email address" required> | |
<button ng-disabled="MailchimpSubscriptionForm.$invalid" ng-click="addSubscription(mailchimp)">Join</button> | |
</div> | |
</div> | |
<!-- Show error message if MailChimp unsuccessfully added the email to the list. --> | |
<div ng-show="mailchimp.result === 'error'" ng-cloak> | |
<span ng-bind-html="mailchimp.errorMessage"></span> | |
</div> | |
<!-- Show success message if MailChimp returned successfully. --> | |
<div ng-show="mailchimp.result === 'success'" ng-cloak> | |
<span ng-bind-html="mailchimp.successMessage"></span> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment