Coder Social home page Coder Social logo

Comments (9)

moribvndvs avatar moribvndvs commented on August 19, 2024

What version of the module and AngularJS are you using? See #18

from ng-idle.

schinken avatar schinken commented on August 19, 2024

Version 0.3.5 with 1.3.14. Sorry for the duplicate ticket. I will chance the version to 0.3.4. I think that'll work in my case

from ng-idle.

schinken avatar schinken commented on August 19, 2024

As far as i can see, the problem still persists with 0.3.4 and angular 1.3.14.

from ng-idle.

psdcoder avatar psdcoder commented on August 19, 2024

Hi. I have the same problem. Version of ng-idle: 0.3.5, angular - 1.3.14

from ng-idle.

psdcoder avatar psdcoder commented on August 19, 2024

I think it's because you are using $interval service, which by default will trigger $digest cycle. Demo
But we can change behavior of $interval if pass 4th parameter "invokeApply" https://code.angularjs.org/1.3.14/docs/api/ngMock/service/$interval

from ng-idle.

moribvndvs avatar moribvndvs commented on August 19, 2024

I think the conclusion is that 0.3.4 is the solution if you're stuck on AngularJS 1.2.

The issue is resolved in 1.0.0, but it's not officially released yet. I've been trying to wrap that up for months now but personal matters have interceded. As an interim, you can try using angular-idle.js/.min.js right from the develop branch.

from ng-idle.

schinken avatar schinken commented on August 19, 2024

Updated ng-idle to 1.0.4. The configuration now looks like this (migrating from 0.3.5)

    app
        .config(function(IdleProvider) {
            IdleProvider.idle(Math.ceil(settings.idleTimeout/1000));
            IdleProvider.timeout(false);
        })
        .run(function($rootScope, Idle, $location, locationService) {

            Idle.watch();

            $rootScope.$on('IdleStart', function() {
                console.log("IdleStart");

                if($location.path() != '/') {
                    locationService.gotoHome();
                }
            });

        });

The digest cycle explained in the first post is still triggerd. Am im using it wrong? Btw, Im still using angular 1.2.21

from ng-idle.

schinken avatar schinken commented on August 19, 2024

Btw, it works with angular 1.3.15

from ng-idle.

moribvndvs avatar moribvndvs commented on August 19, 2024

Please see this comment from #18: #18 (comment)

from ng-idle.

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.