parent
a522bb9f03
commit
7ef9d4a582
|
@ -130,32 +130,37 @@ The goal is for the `@Component` (and friends) to be the compiler of template. S
|
|||
## Template Compiler
|
||||
|
||||
### Template Syntax
|
||||
| Feature | Runtime | Spec | Compiler |
|
||||
| --------------------------------------- | ------- | -------- | -------- |
|
||||
| `<div>` | ✅ | ✅ | ✅ |
|
||||
| `<div>{{exp}}</div>` | ✅ | ✅ | ✅ |
|
||||
| `<div attr=value>` | ✅ | ✅ | ✅ |
|
||||
| `<div (click)="stmt">` | ✅ | ✅ | ✅ |
|
||||
| `<div #foo>` | ✅ | ✅ | ✅ |
|
||||
| `<div #foo="bar">` | ✅ | ✅ | ✅ |
|
||||
| `<div [value]="exp">` | ✅ | ✅ | ✅ |
|
||||
| `<div title="Hello {{name}}!">` | ✅ | ✅ | ✅ |
|
||||
| `<div [attr.value]="exp">` | ✅ | ✅ | ❌ |
|
||||
| `<div class="literal">` | ✅ | ✅ | ✅ |
|
||||
| `<div [class]="exp">` | ❌ | ❌ | ❌ |
|
||||
| `<div [class.foo]="exp">` | ✅ | ✅ | ❌ |
|
||||
| `<div style="literal">` | ✅ | ✅ | ✅ |
|
||||
| `<div [style]="exp">` | ❌ | ❌ | ❌ |
|
||||
| `<div [style.foo]="exp">` | ✅ | ✅ | ❌ |
|
||||
| `{{ ['literal', exp ] }}` | ✅ | ✅ | ✅ |
|
||||
| `{{ { a: 'literal', b: exp } }}` | ✅ | ✅ | ✅ |
|
||||
| `{{ exp \| pipe: arg }}` | ✅ | ✅ | ✅ |
|
||||
| `<svg:g svg:p>` | ❌ | ❌ | ❌ |
|
||||
| `<img src=[userData]>` sanitization | ❌ | ❌ | ❌ |
|
||||
| `<div (nocd.click)>` | ❌ | ❌ | ❌ |
|
||||
| `<div (bubble.click)>` | ❌ | ❌ | ❌ |
|
||||
| `<div (keyup.enter)>` | ❌ | ❌ | ❌ |
|
||||
| `<div (hammer.js)>` | ❌ | ❌ | ❌ |
|
||||
| Feature | Runtime | Spec | Compiler |
|
||||
| ------------------------------------------- | ------- | -------- | -------- |
|
||||
| `<div>` | ✅ | ✅ | ✅ |
|
||||
| `<div>{{exp}}</div>` | ✅ | ✅ | ✅ |
|
||||
| `<div attr=value>` | ✅ | ✅ | ✅ |
|
||||
| `<div (click)="stmt">` | ✅ | ✅ | ✅ |
|
||||
| `<div #foo>` | ✅ | ✅ | ✅ |
|
||||
| `<div #foo="bar">` | ✅ | ✅ | ✅ |
|
||||
| `<div [value]="exp">` | ✅ | ✅ | ✅ |
|
||||
| `<div title="Hello {{name}}!">` | ✅ | ✅ | ✅ |
|
||||
| `<div [attr.value]="exp">` | ✅ | ✅ | ❌ |
|
||||
| `<div class="literal">` | ✅ | ✅ | ✅ |
|
||||
| `<div [class]="exp">` | ❌ | ❌ | ❌ |
|
||||
| `<div [class.foo]="exp">` | ✅ | ✅ | ❌ |
|
||||
| `<div style="literal">` | ✅ | ✅ | ✅ |
|
||||
| `<div [style]="exp">` | ❌ | ❌ | ❌ |
|
||||
| `<div [style.foo]="exp">` | ✅ | ✅ | ❌ |
|
||||
| `{{ ['literal', exp ] }}` | ✅ | ✅ | ✅ |
|
||||
| `{{ { a: 'literal', b: exp } }}` | ✅ | ✅ | ✅ |
|
||||
| `{{ exp \| pipe: arg }}` | ✅ | ✅ | ✅ |
|
||||
| `<svg:g svg:p>` | ❌ | ❌ | ❌ |
|
||||
| `<img src=[userData]>` sanitization | ❌ | ❌ | ❌ |
|
||||
| `<div (nocd.click)>` | ❌ | ❌ | ❌ |
|
||||
| `<div (bubble.click)>` | ❌ | ❌ | ❌ |
|
||||
| `<div (keyup.enter)>` | ❌ | ❌ | ❌ |
|
||||
| `<div (hammer.js)>` | ❌ | ❌ | ❌ |
|
||||
| [`<div (directiveOut)>`][gh23560] | ❌ | ❌ | ❌ |
|
||||
| [`<ng-template (directiveOut)>`][gh23561] | ❌ | ❌ | ❌ |
|
||||
|
||||
[gh23560]: https://github.com/angular/angular/issues/23560
|
||||
[gh23561]: https://github.com/angular/angular/issues/23561
|
||||
|
||||
### Life Cycle Hooks
|
||||
| Feature | Runtime | Spec | Compiler |
|
||||
|
@ -215,7 +220,7 @@ The goal is for the `@Component` (and friends) to be the compiler of template. S
|
|||
### I18N
|
||||
| Feature | Runtime | Spec | Compiler |
|
||||
| ----------------------------------- | ------- | -------- | -------- |
|
||||
| translate text literals | ❌ | ❌ | ❌ |
|
||||
| translate text literals | ✅ | ✅ | ✅ |
|
||||
| rearrange text nodes | ❌ | ❌ | ❌ |
|
||||
| ICU | ❌ | ❌ | ❌ |
|
||||
|
||||
|
|
Loading…
Reference in New Issue