LinkController.js 1.93 KB
'use strict';

AIA.controller("LinkController", ["$scope", "$rootScope","$log", "pages", "$routeParams",
function ($scope, $rootScope, log, pages, $routeParams) {

     //$rootScope.currentActiveModuleTitle = Modules[10].Name;
    //$rootScope.currentActiveModuleTitle = $routeParams.modname;
    $scope.links = [
        new link("encyclopedia", "Encyclopedia", 'http://aia5.adam.com/content.aspx?productId=117', "100%", "750px"),
        new link("IP-10", "IP 10", "http://182.19.10.91:92/IPWeb10/index.aspx", "100%", "750px"),
        new link("indepth-reports", "InDepth Reports", "http://aia5.adam.com/content.aspx?productId=10", "100%", "4000px"),
        new link("complementary-and-alternate-medicine", "Complementary and Alternative Medicine", "http://182.19.10.91:92/CAMHome.aspx", "100%", "750px"),
        new link("bodyguide", "Body Guide", "http://aia5.adam.com/content.aspx?productId=25", "100%", "1050px"),
        new link("symptom-navigator", "Symptom Navigator", "http://aia5.adam.com/content.aspx?productId=44", "100%", "1000px"),
        new link("wellness-tools", "The Wellness Tools", "http://aia5.adam.com/content.aspx?productId=20", "100%", "1500px")
    ];

    $scope.$on('$viewContentLoaded', function (event) {
        // code that will be executed ... 
        // every time this view is loaded

        for (var i = 0; i < $scope.links.length; i++) {
            if ($scope.links[i].modname == $routeParams.modname) {
                $rootScope.currentActiveModuleTitle = $scope.links[i].title;
                $scope.objdata = $scope.links[i].objurl;
                $scope.myObj = $scope.links[i].objstyle;  
            }       
        }
    });

    $scope.showme = false;
    $scope.IsVisible = function () {
    $scope.scroll();

   }

    $scope.scroll = function () {
        // $window.scrollTo(0, 0);
        $("html,body").scrollTop(0);
        //alert("scroll");
    }
}]


);