Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(ivy): document project status #22751

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
162 changes: 162 additions & 0 deletions packages/core/src/render3/STATUS.md
@@ -0,0 +1,162 @@
## Annotations
| Annotation | `defineXXX()` | Run time | Spec | Compiler | Back Patch |
| -------------------- | ------------------------------ | ------- | -------- | -------- | -------- |
| `@Component` | ✅ `defineComponent()` | ✅ | ✅ | ✅ | ❌ |
Copy link
Contributor

@trotyl trotyl Mar 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true, non-element components are not yet supported:

const name = isHostElement ? hostComponentDef !.tag : nameOrComponentType as string;
if (name === null) {
// TODO: future support for nameless components.
throw 'for now name is required';

| `@Directive` | ✅ `defineDirective()` | ✅ | ✅ | ✅ | ❌ |
| `@Directive` | ❌ `defineAbstractDirective()` | ❌ | ❌ | ❌ | ❌ |
| `@Pipe` | ✅ `definePipe()` | ✅ | ✅ | ✅ | ❌ |
| `@Injectable` | ❌ `defineInjectable()` | ❌ | ❌ | ❌ | ❌ |
| `@NgModule` | ❌ `defineInjector()` | ❌ | ❌ | ❌ | ❌ |
| `@ConfigureInjector` | ❌ `defineInjector()` | ❌ | ❌ | ❌ | ❌ |



## Component Composition
| Feature | Runtime | Spec | Compiler |
| ---------------------------------------- | ------- | -------- | -------- |
| creation reordering based on injection | ❌ | ❌ | ✅ |
| `class CompA extends CompB {}` | ❌ | ❌ | ❌ |
| `class CompA extends CompB { @Input }` | ❌ | ❌ | ❌ |
| `class CompA extends CompB { @Output }` | ❌ | ❌ | ❌ |



## Life Cycle Hooks
| Feature | Runtime | Spec | Compiler |
| ------------------------- | ------- | -------- | -------- |
| `onChanges()` | ✅ | ✅ | ✅ |
| `onDestroy()` | ✅ | ✅ | ✅ |
| `onInit()` | ✅ | ✅ | ✅ |
| `onChanges()` | ✅ | ✅ | ✅ |
| `doCheck()` | ✅ | ✅ | ✅ |
| `afterViewChecked()` | ✅ | ✅ | ✅ |
| `afterViewInit()` | ✅ | ✅ | ✅ |
| `afterContentChecked()` | ✅ | ✅ | ✅ |
| `afterContentInit()` | ✅ | ✅ | ✅ |
| listener teardown | ✅ | ✅ | ✅ |



## 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">` | ❌ | ❌ | ❌ |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhevery update class and syle (runtime & spec)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a direct copy from the issue. If the issue has been updated we should make the fixes here before commit. However, we should commit a version that matches the issue first and then submit follow-up PRs to fix the content.

| `<div [class.foo]="exp">` | ✅ | ✅ | ❌ |
| `<div style="literal">` | ✅ | ✅ | ✅ |
| `<div [style]="exp">` | ❌ | ❌ | ❌ |
| `<div [style.foo]="exp">` | ✅ | ✅ | ❌ |
| `{{ ['literal', exp ] }}` | ✅ | ✅ | ❌ |
| `{{ { a: 'literal', b: exp } }}` | ✅ | ✅ | ❌ |
| `{{ exp \| pipe: arg }}` | ✅ | ✅ | ❌ |



## `@Query`
| Feature | Runtime | Spec | Compiler |
| ------------------------------- | ------- | -------- | -------- |
| `@Query(descendants)` | ✅ | ✅ | ❌ |
| `@Query(one)` | ✅ | ✅ | ❌ |
| `@Query(read)` | ✅ | ✅ | ❌ |
| `@Query(selector)` | ✅ | ✅ | ❌ |
| `@Query(Type)` | ✅ | ✅ | ❌ |
| `@ContentChildred` | ✅ | ✅ | ❌ |
| `@ContentChild` | ✅ | ✅ | ❌ |
| `@ViewChildren` | ✅ | ✅ | ❌ |
| `@ViewChild` | ✅ | ✅ | ❌ |



## Content Projection
| Feature | Runtime | Spec | Compiler |
| ------------------------------- | ------- | -------- | -------- |
| `<ng-content>` | ✅ | ✅ | ✅ |
| `<ng-content selector="...">` | ✅ | ✅ | ✅ |
| container `projectAs` | ✅ | ✅ | ❌ |



## Injection Features
| Feature | Runtime | Spec | Compiler |
| ----------------------------------- | ------- | -------- | -------- |
| `inject(Type)` | ✅ | ✅ | ✅ |
| `directiveInject(Type)` | ✅ | ✅ | ❌ |
| `inject(Type, SkipSelf)` | ❌ | ❌ | ❌ |
| `attribute('name')` | ✅ | ✅ | ❌ |
| `injectChangeDetectionRef()` | ✅ | ✅ | ❌ |
| `injectElementRef()` | ✅ | ✅ | ✅ |
| `injectViewContainerRef()` | ✅ | ✅ | ✅ |
| `injectTemplateRef()` | ✅ | ✅ | ✅ |
| default `inject()` with no injector | ❌ | ❌ | ❌ |
| sanitization with no injector | ✅ | ✅ | ❌ |



## Change Detection
| Feature | Runtime |
| ----------------------------------- | ------- |
| `markDirty()` | ✅ |
| `detectChanges()` | ✅ |
| `tick()` | ✅ |
| `attach()` | ✅ |
| `detach()` | ✅ |
| `ON_PUSH` | ✅ |
| `ALWAYS` | ✅ |
| `DIRTY` | ✅ |
| `ATTACHED` | ✅ |



## Bootstrap API
| Feature | Runtime |
| ----------------------------------- | ------- |
| `renderComponent()` | ✅ |
| `getHostElement()` | ✅ |
| `Injector.create()` | ❌ |



## I18N
| Feature | Runtime | Spec | Compiler |
| ----------------------------------- | ------- | -------- | -------- |
| translate text literals | ❌ | ❌ | ❌ |
| rearrange text nodes | ❌ | ❌ | ❌ |
| ICU | ❌ | ❌ | ❌ |





## `______Ref`s
| Method | View Container Ref | Template Ref | Embeded View Ref | View Ref | Element Ref | Change Detection Ref |
| ---------------------- | ------------------ | ------------ | ---------------- | -------- | ----------- | -------------------- |
| `clear()` | ❌ | n/a | n/a | n/a | n/a | n/a |
| `get()` | ❌ | n/a | n/a | n/a | n/a | n/a |
| `createEmbededView()` | ✅ | ✅ | n/a | n/a | n/a | n/a |
| `createComponent()` | ✅ | n/a | n/a | n/a | n/a | n/a |
| `insert()` | ✅ | n/a | n/a | n/a | n/a | n/a |
| `move()` | ❌ | n/a | n/a | n/a | n/a | n/a |
| `indexOf()` | ❌ | n/a | n/a | n/a | n/a | n/a |
| `destroy()` | n/a | n/a | ❌ | ❌ | n/a | n/a |
| `destroyed` | n/a | n/a | ❌ | ❌ | n/a | n/a |
| `onDestroy()` | n/a | n/a | ❌ | ❌ | n/a | n/a |
| `markForCheck()` | n/a | n/a | ❌ | n/a | n/a | ✅ |
| `detach()` | ❌ | n/a | ❌ | n/a | n/a | ✅ |
| `detachChanges()` | n/a | n/a | ❌ | n/a | n/a | ✅ |
| `checkNoChanges()` | n/a | n/a | ❌ | n/a | n/a | ✅ |
| `reattach()` | n/a | n/a | ❌ | n/a | n/a | ✅ |
| `nativeElement()` | n/a | n/a | n/a | n/a | ✅ | n/a |

## Missing Pieces
- Sanitization ✅
- Back patching in tree shakable way. ❌
- attribute namespace ❌