Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

angularjs mailer

I just learned angularjs, and I'm wondering can angularjs create a contact form that sends messages alone? or using a third party library like php mailer but built on javascript?

I'm new, so i'm still confused of the client side language acting like a server side language.

3 Answers

If you want to send e-mails, you'll have to use some server-side technology. It can even be JavaScript in the form of node.js, but it still needs to be done server-side.

ah so you mean, angular is not server side? and node.js is? hmmm... Ive read about a nodemailer though.

Here's probably the best explanation I could find for you:

"For a long time JS was confined to running within the browser (i.e. client-side) but then people took a JS engine (the software that interprets and executes JS) and implemented it on the server-side, creating Node.js. The problem with JS on the client-side is that anyone can view-source on your page and read your code - so any passwords, for example, would be there for all to see. With Node, your JS is stored and executed on the server.. the end-user never has the opportunity to view the program's source code. A node server is essentially a black box, in the same way that a PHP or Ruby server is.. you can put things in, and you can see what comes back out, but what goes on inside is hidden from view." —SitePoint Forums

More resources:

Scotch.io talks a lot about AngularJS and web forms.

cool yo, thank dustin!

No problem. I've updated some more links above. Definitely check out first on the list: The Different Aspects of Web Development by Will Stern.