yes, your $submitted
does not work angular version 1.3
. if you need to show a message, if only the form is submitted, you can save the variable to determine if the form is submitted or not.
to do this
in the controller check function
$scope.create = function(data) { $scope.formSubmitted = true; }
the verification message uses formSubmitted
instead of $submitted
<div class="alert alert-danger" ng-show="formSubmitted && form.first_name.$error.required">E..
Plunker works here
But if you are using angular version 1.3 or later
angular enter $submitted
in angular 1.3.x and may be your attempt with an older version of angular, updating angular will solve your problem.
Changes 1.3 here - please check
New Feature: Add New Submit Status to Forms
<div class="alert alert-danger" ng-show="form.$submitted && form.first_name.$error.required">Enter first name.</div>
plunker works here
source share