var ATLAS_ANATOMY = 'Atlas Anatomy'; var CLINICAL_ILLUSTRATION = 'Clinical Illustrations'; var CLINICAL_ANIMATION = 'Clinical Animations'; var OpenedModuleItemList = []; var ModDetail = []; AIA.service("ModuleService", function ($http, $q, DataService) { var deferred = $q.defer(); this.loadModuleDataBasedOnModuleName = function (moduleName) { var tileHtml; var jsonPath; if (moduleName == ATLAS_ANATOMY) { jsonPath = '~/../content/data/json/aa/aa_dat_contentlist.json'; } else if (moduleName == CLINICAL_ANIMATION) { //to do, in next phase of project jsonPath = '~/../content/data/json/ca/ca_dat_contentlist.json'; } else if (moduleName == CLINICAL_ILLUSTRATION) { //to do, in next phase of project jsonPath = '~/../content/data/json/ci/ci_dat_contentlist.json'; } var promise = DataService.getJson(jsonPath) promise.then( function (result) { var AtlasAnatomyData = result; var data = new jinqJs() .from(AtlasAnatomyData.root.Item) .orderBy([{ field: '_Title', sort: 'asc' }]) .select(); var tileHTML; angular.forEach(data, function (value, key) { // $rootScope.moduleData = []; //$scope.moduleData.push({ "id": value._Id, "imageID": value._ImageId, "TileName": value._TileImageName, "DivImageTitle": value._Title }); // $scope.moduleData.push(value._ImageId); // $scope.moduleData.push(value._TileImageName); var ImageName = value._TileImageName; var imagePath = "~/../content/images/aa/thumbnails/" + value._TileImageName; //$scope.TileViewId = value._Id; tileHTML = $('
' + value._Title + '