【发布时间】:2018-07-07 13:41:14
【问题描述】:
我在 A.JSP 中包含了 B.JSP。 在 A.controller 中,我有以下过滤器。
A.jsp
<body background="${abc}" ng-app="myApp" onload-directive
ng-controller="myController" ng-init="mySwitch=true" disable-keys>
<div class="modal-body" style="height: 500px !important;overflow-y: auto !important;overflow-x: hidden !important;">
<jsp:include page="B.jsp"></jsp:include>
</div>
</body>
Bcontroller.js
var app = angular.module('myApp', ['ui.bootstrap']);
app.controller('myController', function($scope, $compile, $timeout, $filter, $window, myService) {
// code
}); app.filter('isempty', function() {
return function(input) {
return isEmpty(input) ? '' : input;
};
function isEmpty(i) {
return (i === 'null' || i === undefined);
}
});
当我尝试执行 A.JSP 时,我收到了this error
我怎样才能避免这个错误。
【问题讨论】:
-
模块和控制器代码
-
@Sajeetharan 我没听明白,我已经发布了我的 jsp 和控制器代码
-
你在哪里声明了 app = angular.module 和 ng-controller 等
-
@Sajeetharan 我已经编辑了问题。
标签: javascript html angularjs jsp