CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

How to implement first DOM load then angularJs function execute

Open santosh-k1 opened this issue 10 years ago • 2 comments

HI i am facing some problem that first angularjs function execute then View DOM load.. so how to fix this issue.. alternatively i have used below code---

app.run(["$rootScope", "$location","$window", function ($rootScope, $location,$window) { $rootScope.$on("$routeChangeSuccess", function (userInfo) { //console.log(userInfo); angular.element(document).ready(function () { setTimeout(function () { var windowHeight = $(window).height() - 100; $('#page-layout').css({ 'overflow-x': 'auto', 'max-height': windowHeight }); }, 1000); $(window).resize(function () { var windowHeight = $(window).height() - 100; $('#page-layout').css({ 'overflow-x': 'auto', 'max-height': windowHeight }); });

        });
    });
    $rootScope.$on("$routeChangeError", function (event, current, previous, eventObj) {

        if (eventObj.authenticated === false) {
            $location.path("/Login");
        }
    });
}]) 

santosh-k1 avatar Jan 27 '16 05:01 santosh-k1

Hey Santosh, you probably meant to post this somewhere else?

Let me know if we can close this...

Thanks, Mark

mahilleb-msft avatar Jan 27 '16 08:01 mahilleb-msft

yes you can

santosh-k1 avatar Jan 27 '16 10:01 santosh-k1