Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

fix(domRenderer) ng-leave doesn’t works #5

Open
usernamealreadyis opened this issue May 4, 2016 · 0 comments
Open

fix(domRenderer) ng-leave doesn’t works #5

usernamealreadyis opened this issue May 4, 2016 · 0 comments

Comments

@usernamealreadyis
Copy link

@breath103 commented on Fri Jan 29 2016

i was testing NgIf / ng-animate, and ng-enter was working perfectly but ng-leave class wasn't even show up

while checking DomRenderer codes, i found a bug which is detachView method removing DOM before animateNodeLeave.

and if you see the attachView in other hands, https://github.com/angular/angular/blob/0ae77753f34862a6f584e131af1630dbd588b5de/modules/angular2/src/platform/dom/dom_renderer.ts#L139
this basically delegating all the DOM add to animateNodeEnter.

and eventually animateNodeLeave calls DOM.remove, regardless using ng-animate or not.

we're already using angular2 BETA for almost production level product, so that this issue is pretty much urgent since we can't add any animation for leaving at this point haha
(i know there is a long plan for ng2-animate, but still)

so let me know how you guys think. thanks


@googlebot commented on Fri Jan 29 2016

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@breath103 commented on Fri Jan 29 2016

I signed it!


@googlebot commented on Fri Jan 29 2016

CLAs look good, thanks!


@tbosch commented on Tue Feb 02 2016

Hi,
thanks, this is is legit. Could you create a test for this?


@breath103 commented on Tue Feb 02 2016

@tbosch can you tell me where i can start with this testing?
i did consider about testing this, but skipped it in initial commit mainly because i couldn't find any existing unit test or spec that i can start with.
from /angular/modules/angular2/test/platform/dom/dom_renderer_integration_spec.ts
maybe?

(After renaming it to just dom_renderer_spec.ts)


@tbosch commented on Thu Feb 04 2016

Have a look at one of the tests here: https://github.com/angular/angular/blob/master/modules/angular2/test/core/linker/integration_spec.ts


@breath103 commented on Sun Feb 14 2016

oh this is still in progress. initially i thought this would be pretty straight forward but it's not since ng-animate can't be added to non-element node, like <template class='ng-animate'>. doesn't works. so i need to access child DOM element by force.. i can just do it with jQuery or DOM access, but not really sure what is the proper way to do it on angular test suite. i'll let you know when it's done


@usernamealreadyis commented on Sun Feb 14 2016

Interpreter:pattern
If you want to post syntax highlighted code and let me or someone else review it, please put the code inside

 and 
tags. @SomeKittens/_name_your_team
For example:
<pre><code> String foo = "bar"; </code></pre>


@breath103 commented on Wed Feb 17 2016

@gkalpak ok so now it's only failing on Dart Lint, which i have no idea. can you check?


@breath103 commented on Sat Feb 20 2016

@gkalpak any update?


@Kriskit commented on Mon Mar 07 2016

Be good to get this sorted and merged in 👍


@tbosch commented on Fri Mar 11 2016

We will land a more flexible version of animations soon. Closing this as the code will be replaced then.
/cc @matsko


@breath103 commented on Wed Mar 23 2016

@tbosch is there any milestone or clear plan for animation fix in real soon? otherwise, we're kinda really urgently need this haha like i mentioned we're using angular2 on production and we can't add any animation with ng-animate because of this

i totally understand this gonna be legacy code soon, but until than can we just merge this first?


@BojDom commented on Thu Apr 28 2016

So where is the progress of this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant