fix(compiler): support properties on SVG elements
Have DomElementSchemaRegistry support namespaced elements, so that it does not fail when directives are applied in SVG (or xlink). Without this fix, directives or property bindings cannot be used in SVG. Related to #5547 Closes #5653
This commit is contained in:
10
modules/playground/src/svg/index.html
Normal file
10
modules/playground/src/svg/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<title>SVG</title>
|
||||
<body>
|
||||
<svg-app>
|
||||
Loading...
|
||||
</svg-app>
|
||||
$SCRIPTS$
|
||||
</body>
|
||||
</html>
|
22
modules/playground/src/svg/index.ts
Normal file
22
modules/playground/src/svg/index.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {Component} from 'angular2/core';
|
||||
|
||||
@Component({selector: '[svg-group]', template: `<svg:text x="20" y="20">Hello</svg:text>`})
|
||||
class SvgGroup {
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'svg-app',
|
||||
template: `<svg>
|
||||
<g svg-group></g>
|
||||
</svg>`,
|
||||
directives: [SvgGroup]
|
||||
})
|
||||
class SvgApp {
|
||||
}
|
||||
|
||||
|
||||
export function main() {
|
||||
bootstrap(SvgApp);
|
||||
}
|
Reference in New Issue
Block a user