AngularJS
Posted: Fri May 09, 2014 10:32 am
Are there any developers here using AngularJS and wanting to validate AngularJS documents in CSE HTML Validator Pro+ without a lot of false positives?
You can easily program CSE HTML Validator Pro+ ignore attributes starting with "ns-" using the following custom user functions:
Just put the above in a text file, like CSEAngularJS.cfg and then in the Validator Engine Options (Ctrl+F4), Validator Engine->Config File page specify the filename in one of the 'User functions' fields and reload the configuration.
I'd also appreciate anyone's thoughts on improving support for AngularJS in the future. For example, should it be built-in? I'd also like to know how many here use it.
You can easily program CSE HTML Validator Pro+ ignore attributes starting with "ns-" using the following custom user functions:
Code: Select all
function onUnknownAttributeMessage() {
if beginsWithCase($ouam_attname,"ng-") {
$ouam_msgflags=0; // cancel message
$AngularJSAttributesIgnoredCount++;
}
}
function onEndedValidation() {
if isSet($AngularJSAttributesIgnoredCount) {
if $AngularJSAttributesIgnoredCount>0 {
MessageEx(13,2014050900,MSG_COMMENT,'AngularJS attributes ignored: '+$AngularJSAttributesIgnoredCount);
}
}
}
I'd also appreciate anyone's thoughts on improving support for AngularJS in the future. For example, should it be built-in? I'd also like to know how many here use it.