Coder Social home page Coder Social logo

Comments (5)

christopherthielen avatar christopherthielen commented on April 26, 2024 1

Closed by b07a24b

from core.

ranst91 avatar ranst91 commented on April 26, 2024 1

Any plans on fixing it for Angularjs?
Edit: The fact that it's yet to be fixed for AngularJS is quite annoying.
Meanwhile, I am using this:
$state.defaultErrorHandler((error) => angular.noop(error);
In my tests. Handle the error as you wish

from core.

seanhodges-tw avatar seanhodges-tw commented on April 26, 2024

Hi, issue angular-ui/ui-router#3302 refers here, should this fix apply to Angular 1 ui-router too?

from core.

iwan-uschka avatar iwan-uschka commented on April 26, 2024

I try to abort a transition without having an error log entry, i cannot use transition.abort() because i have to wait for a user input ("unsaved changes. continue?") so i return a promise.

      $transitions.onExit({exiting: 'main.settings'}, function(transition) {      
        var deferred = $q.defer();
        
        // promise testing
        $timeout(function(){
          // here i need to create a Rejection Object with type = RejectType.ABORTED 
          deferred.reject(false);
        }, 500);

        return deferred.promise;
      });

If i reject the promise, i get the error log entry, because i don't know, how to create a Rejection with a RejectType.ABORTED in my controller. How can i get access to the Rejection Class?

Or is there any other way, how i can abort a transition asynchronously and without creating a error log entry?

Using Angular 1.5.1 and ui-router 1.0.5.

Thanks

from core.

DzmVasileusky avatar DzmVasileusky commented on April 26, 2024

@iwan-uschka It's because this fix was applied for Angular2-5 ui-router version only.

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.