Proper way to reference a form with AngularJS while conforming to XHTML 1.1 standards? -
.net removing name
attribute form
element i've defined in master page:
<form name="aspnetform" runat="server" onsubmit="if (typeof(_spformonsubmitwrapper) != 'undefined') {return _spformonsubmitwrapper();} else {return true;}" ng-model-options="{updateon: 'default blur','debounce':{'default':250,'blur':0}}">
which gets rendered as:
<form method="post" action="...the current url..." onsubmit="javascript:return webform_onsubmit();" id="aspnetform" ng-model-options="{updateon:'default blur','debounce':{'default':250,'blur':0}}" class="ng-pristine ng-invalid ng-invalid-required ng-valid-date"> == $0
from w3 , microsoft, seems name
attribute formally depreciated in xhtml 1.0 , not allowed in 1.1, , should use id
attribute instead. however, angularjs uses name
attribute publish form on current scope. want check validity of form using angularjs ng-disabled="!aspnetform.$valid"
don't see how make $scope
aware of form. i've tried few variations of this suggested code in controller without success. i've tried setting clientidmode static doesn't seem affect name
tag.
the scope name of form can set using attribute ng-form='aspnetform'
. can see in source code sets name.
Comments
Post a Comment