I'm trying to check some signup fields using the following code:
$scope.signup = function()
{
if ($scope.signup.spans.name)
return;
This is the html code that refers to $scope.signup.spans.name:
<span ng-model="signup.spans.name" style="padding: 2px 0 2px 16px; color: red;" ng-if="!check_name()">Please type a valid name</span>
However after testing the app, I get stuck at the error:
Error: undefined is not an object (evaluating '$scope.signup.spans.name') signup
So what's wrong with my code? is there any possibility to fix that?
I need some help.
Thanks in advance.