1

I've been receiving this error using validator.w3.org as HTML5

"Attribute ng-view not allowed on element div at this point"

how can I solve this problem passing a ng-view through a div ?

<div ng-view></div>
Marcogomesr
  • 2,614
  • 3
  • 30
  • 41

1 Answers1

16

It is specified somewhere on AngularJS Site that if you want a valid html you should place data- before every ng-something. For you

<div data-ng-view></div>

will make the example valid.

Hope it helps. +1 answer

vanntile
  • 2,727
  • 4
  • 26
  • 48
  • 2
    Thanks for the answer. However, does it really matter for e.g. SEO purposes to prefix everything non-standard with "data-"? Or it really doesn't matter, and is just a waste of time? – forsberg Sep 25 '17 at 05:31
  • As far as I know, it is a waste of time but you should be consistent. Either use data- everwhere or don't (in each website). – vanntile Oct 02 '17 at 06:05