pgilad / angular-html5 Goto Github PK
View Code? Open in Web Editor NEWChange your ng-attributes to data-ng-attributes for html5 validation
License: MIT License
Change your ng-attributes to data-ng-attributes for html5 validation
License: MIT License
The <ng-transclude>
tag becomes <data-ng-transclude>.
It doesn't break functionality, but its an unexpected and undesireable effect.
When angular-html5 is configured to replace custom prefixes, e.g. 'my-', and running the replace method on code such as <div my-tab class="my-tab" >
results in <div data-my-tab class="data-my-tab" />
.
Can the module be restricted/configured so that it doesn't do replacement within attribute values, but only attribute names?
I'm using gulp-angular-htmlify in my build process, and just found it to be at the root an issue with broken SVG rendering. The symptom is that any SVG elements in my HTML document that contain more than one child element (e.g., multiple <path>
s) are only rendering the first child element. When I view the generated source, I notice that the browser has interpreted them as nested elements:
<svg>
<path>
<path>
<path>
</svg>
It appears that the gulp-angular-htmlify output tries to convert any XHTML-style self-closing tags (e.g., <path/>
) to their HTML5 equivalent (e.g., <path>
). However, in the case of SVG or MathML elements included in HTML documents, this is against the spec:
http://www.w3.org/TR/html-markup/syntax.html#svg-mathml
Those elements must preserve the self-closing slash to be parsed correctly by browsers (at least the latest Chrome/Mac, where I've seen this issue). Removing the gulp-angular-htmlify step from my Gulpfile fixed the problem immediately.
I've only had a brief chance to look at the source code - could this have something to do with parsing via cheerio?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.