Giter Club home page Giter Club logo

Comments (17)

mapicard avatar mapicard commented on May 26, 2024 1

What requires Angular9+ ngneat/until-destroy, Ivy, or both?

from until-destroy.

arturovt avatar arturovt commented on May 26, 2024 1

@mapicard both. Angular 9 uses Ivy by default.

from until-destroy.

DmitryEfimenko avatar DmitryEfimenko commented on May 26, 2024 1

I'm wondering if this confusion could be mitigated by bringing the ViewEngine functionality into this package. The import would look something like:

import { untilDestroyed } from @ngneat/until-destroy/view-engine

Or is that an overkill that does not help anything?

from until-destroy.

arturovt avatar arturovt commented on May 26, 2024 1

Gentlemen, it's been 2 months and seems like no one hasn't provided any minimal reproducible example. :(

from until-destroy.

NetanelBasal avatar NetanelBasal commented on May 26, 2024 1

Thanks, closing this issue.

from until-destroy.

arturovt avatar arturovt commented on May 26, 2024

Could you create a minimal reproducible example?

from until-destroy.

mapicard avatar mapicard commented on May 26, 2024

I made a minimal setup (https://i3-provider-untildestroy.stackblitz.io) but i'm getting another issue.
Cannot read property 'onDestroy' of undefined

from until-destroy.

DmitryEfimenko avatar DmitryEfimenko commented on May 26, 2024

it seems there's the same issue with Ionic 4

from until-destroy.

NetanelBasal avatar NetanelBasal commented on May 26, 2024

@mapicard you should enable Ivy

from until-destroy.

mapicard avatar mapicard commented on May 26, 2024

Ok, I'm not familiar with this and willing to give it a try but can you elaborate a bit on how it could fix the issue? I am using Ionic3 with Angular5.

from until-destroy.

arturovt avatar arturovt commented on May 26, 2024

@mapicard

:D

It requires Angular 9+.

from until-destroy.

DmitryEfimenko avatar DmitryEfimenko commented on May 26, 2024

these two words answers are really confusing.
I have an app using Ionic 4, Angular 8 (Ivy disabled). I get an error in either case - whether the Decorator is used or not. Does this mean that this library won't work without Ivy enabled?

from until-destroy.

arturovt avatar arturovt commented on May 26, 2024

@DmitryEfimenko

Why? Have you read the readme? πŸ˜‰ I guess there is no sense of copy-pasting it here :D

from until-destroy.

DmitryEfimenko avatar DmitryEfimenko commented on May 26, 2024

I did, but your comment made me look at it again. I remember seeing that under Use with View Engine section the import was from a different package: ngx-take-until-destroy. I assumed that it was a typo and kept trying using the @ngneat/until-destroy. Now I understand that's intentional. Thanks!

from until-destroy.

bleuscyther avatar bleuscyther commented on May 26, 2024

Same one Ionic 5 it never used onDestroy but ionViewDidLeave

from until-destroy.

DmitryEfimenko avatar DmitryEfimenko commented on May 26, 2024

I didn't feel there's a need for it since (with your help) I figured out what the issue was. I'd say the whole thing boils down to the confusion that ViewEngine requires a use of a different package. I think other people are just confused about it. If that's not the case, then yeah, repro is still required.

from until-destroy.

bleuscyther avatar bleuscyther commented on May 26, 2024

@arturovt I was using the wrong package with angular 9.
fixed it
angular 9 (Ivy) : @ngneat/until-destroy
angular 8 ( no-ivy) & bellow : ngx-take-until-destroy

Everything works well now πŸŽ‰. I was reading the comments out of context, based on te old documentation for the library.

Just a additional note for anyone else using IonicFramework and OnDestroy

@mapicard Ionic 3 is not using Ivy,. The last version of Angular i used with it was angular 7. The changed the events after that . (Migrating from Ionic 3.0 to Ionic 4.0).
You can use the old documentation and it will work :
Use with View Engine (Pre Ivy)

from until-destroy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.