Struggling with getting Mailchimp's API to integrate with Angular Resource? I managed to overcome the initial validation errors, but now it's asking for a struct when trying to handle email.
I'm completely lost at this point. Here is my current approach:
// Controller code snippet
this.saved = MailChimp.save({
email:$.param({
email: user.email,
euid: '1',
leid: '2'
})
});
// Service in module
myModule.factory('MailChimp', function($resource){
return $resource('https://us2.api.mailchimp.com/2.0/lists/subscribe.json', {
apikey: 'ac07bec21c8560d088b95888aab219fb-us7',
id: '27749',
email: '@email'
},
{
save: {
method: 'POST'
}
});
});