ADAMImgController.js 1.02 KB
AIA.controller("ADAMImgController", ["$scope", "$rootScope", "pages", "$log", "$location",
function ($scope, $rootScope, pages, log, $location) {
    $scope.showTabButton = true;
    $scope.IsVisible = function () {
        $scope.scroll();

    }

    $scope.scroll = function () {
        // $window.scrollTo(0, 0);
        $("html,body").scrollTop(0);
        //alert("scroll");
    }
    $scope.$on('$viewContentLoaded', function (event) {
        $("#ADAMIMGSpinner").fadeOut('slow');
        // code that will be executed ... 
        // every time this view is loaded

        //get current path
        var currentURL = $location.path();
        var selectedModuleName = '';
        //set module title
        angular.forEach($rootScope.userModules, function (value, key) {
            if (value.slug === currentURL.replace('/', '')) {
                selectedModuleName = value.name;
            }
            $rootScope.currentActiveModuleTitle = selectedModuleName;
        })
    })

}]



);