我最近开始使用AngularCLI。我已将所有文件从Angular2转移到AngularCLI项目。index.html不加载本地CSS
但它不是加载一些本地的css文件,但它正在加载其他css文件?
当前目录是:
-src
--index
--styles.css
--app
---angular2-fullcalendar
----fullcalendar.min.css
的index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cudyangularcli</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="stylesheet" type="text/css" href="../src/app/angular2-fullcalendar/fullcalendar.min.css" >
</head>
<body>
<app-root>Loading...</app-root>
</body>
</html>
from angular-cli自述文件:“您可以通过angular-cli.json中的apps [0] .styles属性添加更多全局样式。” https://www.npmjs.com/package/angular-cli#global-styles – n00dl3
我认为路径是错误的,当你运行你的应用程序时,你的应用程序的根目录被设置为'src'文件夹,在这种情况下你应该重定向到'/ app/...'。 – hakany
@hakany尝试过。仍然是同样的错误。 – User1911