How does AngularJS get away with using custom HTML5 element tags and attributes?

前端 未结 4 661
故里飘歌
故里飘歌 2020-12-08 13:03

Most browsers seem to allow you to create any element tag you like, and add any attribute name you like to elements. For example:


<         


        
4条回答
  •  自闭症患者
    2020-12-08 13:48

    This is kinda opinionated, but so is the topic. The web is now what we make it, we have the ability to create/style/modify non-spec elements. And the Angular team may not really care about specs, its the cutting edge, they allow you to do what you want. That being said, you can do anything and everything in Angular with markup that will validate and conforms to the HTML5 spec (as in they support it both ways).

提交回复
热议问题