JSP中的控制器可用性

时间:2018-07-12 07:19:16

标签: javascript java angularjs jsp

我无法访问Base.jsp或first.jsp中的secondcontroller和secondsercice。 但是我可以在inspect元素中查看secondcontroller和secondercice。 如果我观察到ng并单击昆虫元素<a href="javascript: void(0);" class="ng-binding"

如果我执行second.jsp,则控制器和服务正在运行,并且正在加载数据。 当我使用下面的过程时,我没有得到加载数据。 我该如何像second.jsp

这样的以下流程进行工作

Base.jsp

<%@include file="CacheBustUrl.jsp" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="myController.js" ></script>

</head>
<body  ng-app="myApp"  
    ng-controller="myController">

     <onload-documents-directive></onload-documents-directive>
     <get-documents></get-documents>


</div>
    <jsp:include page="first.jsp"></jsp:include>

    </div>

</body>
</html>         

first.jsp

<%@include file="CacheBustUrl.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body onload-documents-directive>
<div class="modal fade rotate" id="firstPopup">
        <div class="modal-dialog" style="width:1032px !important;">
            <div class="modal-content">
          <div class="container"></div>
            <div class="modal-body">
                <jsp:include page="second.jsp"></jsp:include>
                </div>

            </div>
        </div>
    </div>
</body>
</html>

second.jsp

<%@include file="CacheBustUrl.jsp"%>
<!doctype html>
<html>
<head>
<script src="${secondControllerjs}"></script>
<script src="${secondServicejs}"></script>
<script src="${cbemptyCheckerjs}"></script>
</head>
<body ng-app="myApp" onload-documents-directive
    ng-controller="secondController" 
     ng-init="mySwitch=true" disable-keys>
</body>
</html>

0 个答案:

没有答案