With AngularJS
Your should NOT have to do validate every variation of your page as DOM
changes with script in your Single Page Application as long as you stick with AngularJS
programming model and stick to the following:-
Validate every HTML file/fragment.
These are Angular templates/partials OR any HTML files you may have (index.html). Use
grunt
based html validator plugins like this so that grunt workflow can ensure that the HTML is valid even before it is committed in to your source code repository. Such plugins can validate HTML fragments.Use built-in
AngularJS
directives to manipulate theDOM
.e.g. ngSwitch, ngView, ngIf etc. instead of any custom stuff using jQuery or other mechanism.
AngularJS
already ensures a valid HTML DOM. That means your resulting HTML is always going to be valid.