2017-02-16 71 views
-2

我首次在AWS上託管了我的Angular應用程序。配置域,設置安全組。目前,它僅託管在HTTP上,因爲沒有用戶或付款信息從站點傳輸。然而,當我嘗試從公共IP訪問該網站時,似乎所有javascript都已損壞,並且沒有運行,因此只有頁面上的html組件正在運行。由於大多數站點都是用角度構建的,大部分html都是通過角模板構建的,所以很痛苦。AWS託管的網站在使用公共IP訪問時未運行腳本

任何建議讚賞。

我附加的來自移動(和SEO分析網站)觀看時,我所看到的截圖和我在使用這個地址

mobile screenshot

fully function screenshot

從自己的電腦視圖中看到包括主頁的html。

<!DOCTYPE html> 
 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
 
<%@page session="true"%> 
 

 
<html ng-app="landingApp" > 
 
<head> 
 

 
<link rel="stylesheet" type="text/css" href="./presentationResources/css/bootstrap.css"> 
 
<link rel="stylesheet" type="text/css" href="./presentationResources/css/bootstrap.min.css"> 
 
<link rel="stylesheet" type="text/css" href="./presentationResources/css/bootstrap-custom.css"> 
 
<link rel="stylesheet" type="text/css" href="./presentationResources/css/font-awesome.css"> 
 
<link rel="stylesheet" type="text/css" href="./presentationResources/css/responsive.css"> 
 
<link rel="stylesheet" type="text/css" href="./presentationResources/css/myStyles.css"> 
 
<link rel="stylesheet" type="text/css" href="./presentationResources/css/landing.css"> 
 
<link rel="stylesheet" type="text/css" href="./presentationResources/css/demoApp.css"> 
 
<link rel="stylesheet" type="text/css" href="./presentationResources/css/animation.css"> 
 
    <link rel="stylesheet" type="text/css" href="./presentationResources/css/searchFacets.css"> 
 
<link rel="stylesheet" type="text/css" href="./presentationResources/css/jquery.bxslider.css"> 
 

 
<link href="https://fonts.googleapis.com/css?family=Lobster|Open+Sans+Condensed:300" rel="stylesheet"> 
 
<link href="https://fonts.googleapis.com/css?family=Playfair+Display" rel="stylesheet"> 
 

 
<link rel="shortcut icon" href="./presentationResources/images/favicon.png" type="image/x-icon"> 
 

 
<script type="text/javascript" src="./presentationResources/js/highlighter.js"></script> 
 
<script type="text/javascript" src="./presentationResources/js/jquery-1.9.1.js"></script> 
 
<script type="text/javascript" src="./presentationResources/js/jquery-ui.js"></script> 
 
<script type="text/javascript" src="./presentationResources/js/angular.js"></script> 
 
<script type="text/javascript" src="./presentationResources/js/landing.js"></script> 
 
<script type="text/javascript" src="./presentationResources/js/landingAboutUs.js"></script> 
 
<script type="text/javascript" src="./presentationResources/js/landingMainAppDemoSupp.js"></script> 
 
<script type="text/javascript" src="./presentationResources/js/landingMainAppDemo.js"></script> 
 
<script type="text/javascript" src="./presentationResources/js/jquery.bxslider.min.js"></script> 
 

 
<title>Personnel Tracker</title> 
 
<style> 
 

 

 

 
</style> 
 

 
<script> 
 

 

 

 
\t $(document).ready(function(){ 
 

 
\t \t \t \t \t document.getElementById("openByDefault").click(); 
 
\t \t \t \t \t $('.bxslider').bxSlider({ 
 
\t \t \t \t \t \t \t captions: true 
 
\t \t \t \t \t }); 
 

 
      var bxViewportHeight = $(".bx-viewport").height(); 
 
      console.log("height : "+bxViewportHeight); 
 

 
      if(bxViewportHeight < 300){ 
 
       $(".carouselAndBuzzSection").css("margin-bottom", "20%"); 
 
      }else{ 
 
       $(".carouselAndBuzzSection").css("margin-bottom", "0%"); 
 
      } 
 

 
    }); 
 

 

 
</script> 
 

 
\t <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
\t <meta name="title" content="Personnel Tracker 360" /> 
 
    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' /> 
 
<meta name="description" content="Personnel Tracker 360 by Scion Solutions Group empowers organisations to accurately track all aspects of employee management. Matching skillset to current roles and providing performance reporting. " /> 
 

 
</head> 
 
<body> 
 

 

 
\t <div id="main-box" class="main-box responsive"> 
 

 
<h1 class="pageHeaderLogo responsive"> Personnel Tracker <span>360</span> </h1> 
 
<ul class="tab"> 
 
    <li><a href="javascript:void(0)" class="tablinks defaultTab glyphicon glyphicon-blackboard" 
 
\t \t \t \t onclick="openTab(event, 'welcomeTab')" id="openByDefault" > 
 
\t \t \t \t  <span style="font-family: 'Roboto Condensed',sans-serif !important;">Welcome </span></a></li> 
 

 
    <li><a href="javascript:void(0)" class="tablinks glyphicon glyphicon-home" onclick="openTab(event, 'appTab')"> 
 
\t \t <span style="font-family: 'Roboto Condensed',sans-serif !important;"> Demo App</span></a></li> 
 

 
    <li><a href="javascript:void(0)" class="tablinks glyphicon glyphicon-info-sign" onclick="openTabAboutUs(event, 'aboutTab')"> 
 
\t \t <span style="font-family: 'Roboto Condensed',sans-serif !important;">About Us</span></a></li> 
 
\t <div class="_stickFigureElement responsive"><img class="imgAnime" src='./presentationResources/images/profilePics/stickfigure2.png' /></div> 
 
</ul> 
 

 

 

 

 
<div id="welcomeTab" class="tabcontent"> 
 
    <welcome-page></welcome-page> 
 
</div> 
 
<div id="appTab" class="tabcontent"> 
 
    <app-page-demo></app-page-demo> 
 
</div> 
 
<div id="aboutTab" class="tabcontent"> 
 
    <about-us-page></about-us-page> 
 
</div> 
 

 

 

 
\t </div> 
 

 

 
</body> 
 
</html>

我不遠程引用任何JavaScript。

+0

打開開發人員控制檯並查看網絡選項卡。通知我們有任何錯誤。 – TRiNE

+1

這聽起來像是你需要打開你的瀏覽器的調試控制檯,看看JavaScript錯誤是什麼。一旦你收集了更多的信息,如果你仍然無法解決這個問題,請更新你的問題與額外的信息。因爲這裏沒有足夠的細節來幫助你。 –

+0

你如何在項目中包含js?你是否以快遞服務?這聽起來像你提供的任何頁面都無法訪問你的js文件/文件。 – Snarf

回答

相關問題