Skip to content

refactor(views): split ViewManager/ViewContainerRef.createView into…#3114

Closed
tbosch wants to merge 1 commit into
angular:masterfrom
tbosch:manual-projection
Closed

refactor(views): split ViewManager/ViewContainerRef.createView into…#3114
tbosch wants to merge 1 commit into
angular:masterfrom
tbosch:manual-projection

Conversation

@tbosch
Copy link
Copy Markdown
Contributor

@tbosch tbosch commented Jul 17, 2015

… 2 methods

BREAKING CHANGES:

ViewManager.createView / ViewContainerRef.create have been split into 2 methods:

  • createHostView which takes dynamically created bindings
  • createEmbeddedView which takes the newly introduced TemplateRef

The new type TemplateRef is the combination of a ProtoViewRef and and ElementRef
from the same place. Use TemplateRef when working with embedded views in
ng-if, ng-for, ... instead of ProtoViewRef.

Also, ProtoViewRef is no more injectable, but TemplateRef is.

First part of #1989 to clean up manual content projection.

@tbosch tbosch added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jul 17, 2015
… 2 methods

BREAKING CHANGES:

`ViewManager.createView` / `ViewContainerRef.create` have been split into 2 methods:

- `createHostView` which takes dynamically created bindings
- `createEmbeddedView` which takes the newly introduced `TemplateRef`

The new type `TemplateRef` is the combination of a `ProtoViewRef` and and `ElementRef`
from the same place. Use `TemplateRef` when working with embedded views in
`ng-if`, `ng-for`, ... instead of `ProtoViewRef`.

Also, `ProtoViewRef` is no more injectable, but `TemplateRef` is.

First part of angular#1989 to clean up manual content projection.
@tbosch tbosch force-pushed the manual-projection branch from 085f2f1 to dcbc02a Compare July 17, 2015 16:44
@tbosch tbosch added pr_state: LGTM and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jul 17, 2015
@tbosch
Copy link
Copy Markdown
Contributor Author

tbosch commented Jul 17, 2015

Reviewed in person with @vsavkin

@tbosch tbosch closed this in f42382d Jul 17, 2015
@tbosch tbosch deleted the manual-projection branch July 21, 2015 17:28
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants