-2
我首次在AWS上托管了我的Angular应用程序。配置域,设置安全组。目前,它仅托管在HTTP上,因为没有用户或付款信息从站点传输。然而,当我尝试从公共IP访问该网站时,似乎所有javascript都已损坏,并且没有运行,因此只有页面上的html组件正在运行。由于大多数站点都是用角度构建的,大部分html都是通过角模板构建的,所以很痛苦。AWS托管的网站在使用公共IP访问时未运行脚本
任何建议赞赏。
我附加的来自移动(和SEO分析网站)观看时,我所看到的截图和我在使用这个地址
从自己的电脑视图中看到包括主页的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。
打开开发人员控制台并查看网络选项卡。通知我们有任何错误。 – TRiNE
这听起来像是你需要打开你的浏览器的调试控制台,看看JavaScript错误是什么。一旦你收集了更多的信息,如果你仍然无法解决这个问题,请更新你的问题与额外的信息。因为这里没有足够的细节来帮助你。 –
你如何在项目中包含js?你是否以快递服务?这听起来像你提供的任何页面都无法访问你的js文件/文件。 – Snarf