Javascript 如何使用包括

Javascript 如何使用包括,javascript,jquery,html,angularjs,include,Javascript,Jquery,Html,Angularjs,Include,我刚开始在Express框架上使用angularjs,我正在尝试加载包含的html页面。现在,我已经在angular中设置了路由,工作正常,但是当我尝试在html页面中使用ng include时,它有点循环,并给出以下错误: Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.6.3/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22ms…Be()%3Breturn%20d(a)%

我刚开始在Express框架上使用angularjs,我正在尝试加载包含的html页面。现在,我已经在angular中设置了路由,工作正常,但是当我尝试在html页面中使用ng include时,它有点循环,并给出以下错误:

Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.6.3/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22ms…Be()%3Breturn%20d(a)%7D%22%2C%22newVal%22%3A%22nav-mobile.html%22%7D%5D%5D
at angular.js:38
at m.$digest (angular.js:18048)
at angular.js:18211
at e (angular.js:6274)
at angular.js:6554
现在我正试图创建nav-bar-mobile.html的内联代码,将其注入页面,但我无法实现这一点。有人有主意吗

我的路由如下所示:

var-app=angular.module(“myApp”、“ngRoute”、“ngAnimate”);
/*路由*/
app.config(函数($routeProvider,$locationProvider){
$routeProvider
。当(“/”{
templateUrl:'partials/home.html',
控制器:“homeController”
})
。当(“/wie”{
templateUrl:'partials/wie.html',
控制器:“关于控制器”
})
.when(“/portfolio”{
templateUrl:'partials/portfolio.html',
控制器:“portfolioController”
})
。当(“/通道”{
templateUrl:'partials/channel.html',
控制器:“信道控制器”
})
。当(“/联系人”{
templateUrl:'partials/contact.html',
控制器:“contactController”
});
$locationProvider.html5Mode(true);
});
/*控制器*/
应用程序控制器('homeController',函数($scope){
$scope.pageClass='home';
});
app.controller('aboutController',函数($scope){
$scope.pageClass='wie';
});
应用程序控制器('portfolioController',函数($scope){
$scope.pageClass='portfolio';
});
应用控制器('channelController',函数($scope){
$scope.pageClass='channel';
});
应用控制器('contactController',功能($scope){
$scope.pageClass='contact';

});如果HTML页面不在同一文件夹中,则需要提供该页面的完整路径。

天哪,我提供了HTML文件夹中的路径,而不是应用程序的根目录。谢谢,这就成功了