Answer the question
In order to leave comments, you need to log in
Angular doesn't see the binding
Hello,
I'm slowly learning with Angularjs, I want to make a simple email subscription form.
Here is an example http://jsfiddle.net/2Kaju/
But for some reason $scope does not have my email variable.
Where am I wrong? And in general, maybe I'm not doing this form correctly at all?
Answer the question
In order to leave comments, you need to log in
Variables are in different $scope.
Use "dot" in such cases: jsfiddle.net/2Kaju/8/
More: www.egghead.io/video/DTx23w4z6Kc
You have chosen the wrong tool for this task and the wrong example for learning the framework. In this case, the best tool is code like $(form).submit($.ajax({})). Connecting a monstrous framework for the sake of 2 fields is at least strange.
Angular is designed primarily for creating CRUD applications (this is written in the documentation). Applications with models, navigation, ajax and more. The fact that you are trying to make a subscription form for them says that either 1) you did not even read the first chapter of the documentation 2) you read, but did not understand what is written there.
And I hope that you are doing this for yourself, and not for a customer or employer, for example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question