feat(ivy): added namespaced attributes (#23899)

PR Close #23899
This commit is contained in:
Ben Lesh
2018-05-25 13:28:49 -07:00
committed by Victor Berchet
parent 81e4b2a4bf
commit d6989c80d3
6 changed files with 155 additions and 43 deletions

View File

@ -260,8 +260,11 @@ export function injectAttribute(attrNameToInject: string): string|undefined {
const attrs = tElement.attrs;
if (attrs) {
for (let i = 0; i < attrs.length; i = i + 2) {
const attrName = attrs[i];
let attrName = attrs[i];
if (attrName === AttributeMarker.SELECT_ONLY) break;
if (attrName === 0) { // NS.FULL
attrName = attrs[i += 2];
}
if (attrName == attrNameToInject) {
return attrs[i + 1] as string;
}