Coder Social home page Coder Social logo

Comments (12)

christopherthielen avatar christopherthielen commented on April 25, 2024 4

Closing because I have no way to reproduce this.

from angular-hybrid.

BenevidesLecontes avatar BenevidesLecontes commented on April 25, 2024

@christopherthielen i'm having this issue as well, it seems that this issue old.

from angular-hybrid.

marcpearson avatar marcpearson commented on April 25, 2024

@christopherthielen Could you please take a look at this bug. Maybe is not a real one but i can't find a solution. I tried to use the example for checking if ngOnInit will be call twice but the example didn't work.

I can't migrate my application because of this bug. Thanks !!!

from angular-hybrid.

christopherthielen avatar christopherthielen commented on April 25, 2024

If a reproduction is posted I can try to fix it!

from angular-hybrid.

marcpearson avatar marcpearson commented on April 25, 2024

(Excuse my english, i'm a french speaker)

I tried to reproduce the bug first within your example code but the example didn't start. (Missing dependencies, no webpack config...) Maybe you could try by yourself with an onNgInit function inside a NG2 controller in your example. Call your NG2 route component with $state.go like i said in the initial post and console something. You'll see 2 output in the browser console.

If you prefer to fix the example code, i could try by myself first to reproduce the bug

Or tell me what i need to give you to help debugging

thanks

from angular-hybrid.

marcpearson avatar marcpearson commented on April 25, 2024

Do you have some news about this issue ?

from angular-hybrid.

christopherthielen avatar christopherthielen commented on April 25, 2024

@marcpearson The example code should work now.

git clone https://github.com/ui-router/angular-hybrid.git
cd angular-hybrid/example
npm install
npm start

I added the ngOnInit() to the routed angular 2 component and it only is triggered once. How can I reproduce the behavior you reported? Have you tried enabling trace? router.trace.enable(1)

from angular-hybrid.

BenevidesLecontes avatar BenevidesLecontes commented on April 25, 2024

@christopherthielen i have trace enabled it shows only one transition, but suddenly my components init twice, all of them. I'm living with that for now, until i migrate all my app to angular. I don't know how to reproduce too.

from angular-hybrid.

christopherthielen avatar christopherthielen commented on April 25, 2024

@BenevidesLecontes I'd like to get the bottom of this. Would you be able to share your repository with me? I could sign an NDA if needed.

from angular-hybrid.

BenevidesLecontes avatar BenevidesLecontes commented on April 25, 2024

@christopherthielen i'll try to eject a module from my app and share with you. Thanks for your effort.

from angular-hybrid.

fxuniverse avatar fxuniverse commented on April 25, 2024

Also experiencing this. Only when navigating between states passed into UIRouterModule.forChild components defined within are initialized twice, breaking our application. Removing lazyloading does not seem to make a difference, same behavior when module is imported normally. Will appreciate any hints

from angular-hybrid.

christopherthielen avatar christopherthielen commented on April 25, 2024

If a reproduction is posted I can try to fix it!

from angular-hybrid.

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.