GithubHelp home page GithubHelp logo

Comments (4)

christopherthielen avatar christopherthielen commented on July 16, 2024

UI-Router shouldn't be calling extend with a string;

can you show me how to reproduce this?

You can start here:
http://plnkr.co/edit/CcxVK5hq4DmfUqoO4K1B?p=preview

from core.

alalonde avatar alalonde commented on July 16, 2024

Here is a demonstration: http://plnkr.co/edit/Oybvbw1nrMFXy9yy2m1G?p=preview

Click 'vendor list' and then 'new vendor' and see the stack trace.

The problem is in the onSuccess transition -- the use case is to detect when the state has been reloaded. In IE it throws an error as soon as you leave that state though.

from core.

christopherthielen avatar christopherthielen commented on July 16, 2024

@alalonde thanks for the plunker.

The API for onSuccess does not take a string. It takes an object with to, from, entering, exiting, or retained properties.

I think you would want $transitions.onSuccess({ exiting: $state.current.name, entering: $state.current.name } ... to detect when the state is being reloaded.

Note you should always deregister hooks in $onDestroy that were registered by a component
Also note that the hook must use a higher priority, otherwise the $onDestroy is invoked before the hook can be fired.
http://plnkr.co/edit/IoTItAoF1ah3iTqd9hHA?p=preview

Note: if you use uiCanExit then you can avoid the manual deregistration:
http://plnkr.co/edit/PUMmoIGKyF1NEX8sFeWG?p=info

Im closing this because the reported issue (_extend and IE) is due to passing invalid arguments to the API

from core.

alalonde avatar alalonde commented on July 16, 2024

Thanks for the tips. When I isolated the issue I ended up switching the hook to use the to/from format you mentioned. The string used to work in beta.3, but no matter; seems to work now.

from core.

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.