Form validation is not working in MEAN Stack using angular js and node js
<p>Hello I am working with MEAN Stack application.When I add record data stored </p>

<p>Successfully. But When I don't fill any field and click add button which is </p>

<p>Calling function for store record My function working properly But I used the </p>

<p><strong>Validation field is required</strong> but function working and redirect my given path.</p>

<p>new data is not storing but why function is working.</p>

<p>function in controller</p>

<pre><code> $scope.adduser = function() 
    {

        $http({
            method:"POST",
            url:'api/adduser',
            data:{name:$scope.name, email:$scope.email,password:$scope.password}
             }).then(function successCallback(response) {
              if(response.data.error){
                    $scope.error = response.data.error;

              }else{

                    $scope.Blog=response.data;
                    $localStorage.dd=$scope.Blog;
                    $location.path('/allusers');
              }
              //console.log(response);
            }, function errorCallback(response) {
               alert("data is not comming here");
            });


    }
</code></pre>

<p>message show field is required but not stay there go to the given path when </p>

<p>response success. how to resolved this problem </p>

<p>view file is</p>

<pre><code>&lt;!-- BEGIN PAGE HEADER--&gt;
&lt;h3 class="page-title"&gt;
    Advanced Datatables &lt;small&gt;advanced datatable samples&lt;/small&gt;
&lt;/h3&gt;
&lt;div class="page-bar"&gt;
    &lt;ul class="page-breadcrumb"&gt;
        &lt;li&gt;
            &lt;i class="fa fa-home"&gt;&lt;/i&gt;
            &lt;a href="#"&gt;Home&lt;/a&gt;
            &lt;i class="fa fa-angle-right"&gt;&lt;/i&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;a href="#/allusers"&gt;All Users&lt;/a&gt;
        &lt;/li&gt;
    &lt;/ul&gt;

&lt;/div&gt;
&lt;div class="row"&gt;
    &lt;div class="col-md-12"&gt;

        &lt;!-- BEGIN VALIDATION STATES--&gt;
        &lt;div class="portlet box blue-hoki"&gt;
            &lt;div class="portlet-title"&gt;
                &lt;div class="caption"&gt;
                    &lt;i class="fa fa-gift"&gt;&lt;/i&gt;
                   New User
                &lt;/div&gt;

            &lt;/div&gt;

            &lt;div class="portlet-body form"&gt;

                &lt;form id = "expensesCreate" class="form-horizontal"&gt;
                    &lt;div class="form-body"&gt;
                        &lt;div class="alert alert-danger display-hide"&gt;
                            &lt;button class="close" data-close="alert"&gt;&lt;/button&gt;
                            You have some form errors. Please check below.
                        &lt;/div&gt;


                        &lt;/div&gt;

                        &lt;div class="form-group"&gt;

                            &lt;label for="price" class="col-sm-3"&gt;Name&lt;/label&gt;
                            &lt;div class="col-sm-4 @if($errors-&gt;has('price')) has-error @endif"&gt;
                                &lt;input class="form-control input-sm" placeholder="" autocomplete="off" id="first_name"  name="name" ng-model="name" type="text" value ="" required&gt;
                                &lt;p class="error"&gt;&lt;/p&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;

                        &lt;div class="form-group"&gt;

                            &lt;label for="price" class="col-sm-3"&gt;Email&lt;/label&gt;
                            &lt;div class="col-sm-4 @if($errors-&gt;has('price')) has-error @endif"&gt;
                                &lt;input class="form-control input-sm" placeholder="" autocomplete="off" id="email" name="email" ng-model="email" type="text" value ="" required&gt;
                                &lt;p class="error"&gt;&lt;/p&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;


                        &lt;div class="form-group"&gt;
                            &lt;label for="Phone_no" class="col-sm-3"&gt;Password&lt;/label&gt;
                            &lt;div class="col-sm-4 @if($errors-&gt;has('Phone_no')) has-error @endif"&gt;
                                &lt;input class="form-control input-sm" placeholder="" autocomplete="off" id="phone_no"  name="company_name" ng-model="password"  type="text" value ="" required&gt;
                                &lt;p class="error"&gt;&lt;/p&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;

                     &lt;div class="form-actions"&gt;
                        &lt;div class="row"&gt;
                            &lt;div class="col-md-offset-3 col-md-9"&gt;

                                &lt;button  ng-click="adduser()" class="btn blue-hoki"&gt;Add&lt;/button&gt;
                                &lt;a ng-href="#/allusers"&gt;
                                    &lt;button type="button" class="btn default" id="cancel"&gt;Cancel&lt;/button&gt;
                                &lt;/a&gt;

                            &lt;/div&gt;

                        &lt;/div&gt;
                    &lt;/div&gt;

                    &lt;/div&gt;

                &lt;/form&gt;
                &lt;!-- END FORM--&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;!-- END VALIDATION STATES--&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;style&gt;

.form-horizontal .form-group {
    margin-right: -15px;
   margin-left: 0px;
}


&lt;/style&gt;
</code></pre>