Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught TypeError: Cannot read property '$$minErr' of undefined

I got this error and my validation is not working properly. I use CDN as declared below my data is stored in localstorage

Uncaught TypeError: Cannot read property '$$minErr' of undefined
    (anonymous function) @ angular-resource.js:8
    (anonymous function) @ angular-resource.js:6

I Use This CDN

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.min.js"></script>

And below is my Html Form

<div> <input id="email"
                       class="form-control"
                       type="email"
                       name="email"
                       ng-model="user.email"
                       pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$"
                       placeholder="Enter Your Email"
                       required
                />
                <span ng-show="myForm.email.$dirty && myForm.email.$invalid" class="color">Invalid Email address.</span>
        <span ng-show="myForm.email.$dirty  && form.email.$error.required">
      Email is required
    </span>
  </div>
    <div> <input type="password"
                         class="form-control"
                         ng-minlength="5"
                         ng-maxlength="10"
                         ng-model="loginCtrl.user.pass"
                         name="pass"
                         id="pass"
                         placeholder="Enter Your Password"
                         required
            />
                <span ng-show="myForm.pass.$dirty && myForm.pass.$error.required" class="color">Required!!!</span> <br>
            </div>
 <div align="center">
                <input ng-click="myFun()"type="submit"  class="btn btn-success"  ng-disabled="myForm.$invalid"  value="Login" >
            </div>
like image 225
user3844586 Avatar asked Mar 22 '16 05:03

user3844586


1 Answers

You have not loaded the Angular. Include angularJS cdn before including angular-resource.

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>
like image 83
Nagaraja Thangavelu Avatar answered Oct 10 '22 09:10

Nagaraja Thangavelu