我是新的Angular,我必须在我的项目中实现服务器端分页,所以我做了一切,就像在这个例子中完成的一样: Angularjs教程中的服务器端分页
但我在我的网络浏览器控制台中收到这些错误:
GET
http://*********/admin/css/bootstrap.min.css [HTTP/1.1 404 Not Found 1043ms]
GET
http://*********/admin/css/bootstrap-theme.min.css [HTTP/1.1 404 Not Found 1385ms]
GET
http://*********/admin/css/styles.css [HTTP/1.1 404 Not Found 1334ms]
GET
http://*********/admin/lib/angular/angular.js [HTTP/1.1 404 Not Found 1384ms]
GET
http://*********/admin/lib/dirPagination.js [HTTP/1.1 404 Not Found 1383ms]
GET
http://*********/admin/app/app.js
and
Error: [$injector:modulerr] Failed to instantiate module angularTable due to:
[$injector:nomod] Module angularTable is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Run Code Online (Sandbox Code Playgroud)
如果有人可以帮助我!
这通常发生在你做某事......
angular.module('myapp').controller(function() {
});
Run Code Online (Sandbox Code Playgroud)
请注意,此代码不会创建名为myapp的模块,它只引用现有模块.如果您尚未创建模块,则会遇到您遇到的错误.
要创建模块,请执行以下操作...
angular.module('myapp', []);
Run Code Online (Sandbox Code Playgroud)
另外,不要忘记HTML中的ng-app指令...
<html ng-app="myapp">
Run Code Online (Sandbox Code Playgroud)
当然,这假设您的脚本文件正确加载.根据您的问题,您的文件无法加载,因此没有创建myapp也就不足为奇了.您应该检查您尝试加载的文件是否确实存在于您的服务器上.还要确保您知道哪个文件夹是Web服务器从中提供文件的根文件夹.这将帮助您正确地获取文件路径.