W3C validation with AngularJS directives

前端 未结 2 1716
你的背包
你的背包 2020-12-03 10:10

How do we go about doing W3C validation with an Angular application?

Since custom directives make for invalid HTML validation, we typically see lots of W3C validatio

2条回答
  •  悲哀的现实
    2020-12-03 10:33

    Strict w3c validation allows any data-* attributes, and any class.

    Directives can be applied to DOM elements with any of:

    1. (*)

    At least the data- one is fully W3C compliant (provided you declare HTML5 doctype). So the following code validates (the attribute name, of course it fails for missing title, missing encoding etc):

    
    
     
     
    
    

提交回复
热议问题