8000 WIP: Template context by tbosch · Pull Request #8321 · angular/angular · GitHub
[go: up one dir, main page]

Skip to content

WIP: Template context #8321

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

Closed
wants to merge 1 commit into from
Closed

Conversation

tbosch
Copy link
Contributor
@tbosch tbosch commented Apr 29, 2016

No description provided.


set ngIf(newCondition: any /* boolean */) {
if (newCondition && (isBlank(this._prevCondition) || !this._prevCondition)) {
this._prevCondition = true;
this._viewContainer.createEmbeddedView(this._templateRef);
this._viewContainer.createEmbeddedView(this._templateRef, EMPTY_CONTEXT);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Support passing null.

@tbosch tbosch added pr_state: LGTM action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Apr 29, 2016
@tbosch
Copy link
Contributor Author
tbosch commented Apr 29, 2016

Reviewed in person with @mhevery

@tbosch tbosch force-pushed the template_context branch 7 times, most recently from f20f79a to a2bb869 Compare April 29, 2016 06:52
BREAKING CHANGE:
- Before, a `EmbeddedViewRef` used to have methods for 
  setting variables. Now, a user has to pass in a context
  object that represents all variables when an `EmbeddedViewRef`
  should be created.
- `ViewContainerRef.createEmbeddedViewRef` now takes
   a context object as 2nd argument.
- `EmbeddedViewRef.setLocal` and `getLocal` have been removed.
  Use `EmbeddedViewRef.context` to access the context.
- `DebugNode.locals` has been removed. Use the new methods `DebugElement.references`
  to get the references that are present on this element,
  or `DebugElement.context` to get the context of the `EmbeddedViewRef` or the component to which the element belongs.
@tbosch tbosch force-pushed the template_context branch from a2bb869 to 182a3d1 Compare April 29, 2016 07:48
@tbosch tbosch closed this in cacdead Apr 29, 2016
@tbosch tbosch deleted the template_context branch April 29, 2016 17:22
@angular-automatic-lock-bot
Copy link

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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0