Anyone has idea, how to produce valid HTML5 when images are displayed with AngularJs ng-scr directive?
What I have discovered?
- "src"- attribute is required on img-tags
- It can't be empty
- Console reports 404 error if I set src attribute data with angular binding, cause it tries to load image before Angular has initialized
Why I want valid HTML?
Reason is simple. Strange HTML errors (missing end tags, open tags etc..) causes strange behavior in our project where we have LOTS of views. Ensuring periodically that source is valid, makes code less unstable.