jay*_*jay 3 css node.js express twitter-bootstrap angularjs
我正在开发一个基于MEAN堆栈的Web应用程序.我使用bootstrap作为css lib,并在我的"app.css"和"mio.css"的两个文件中有一些css覆盖,应用程序工作正常,直到我点击refresh处理两个部分的控制器,而不是一切都重新加载除了我的2个css文件.
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/app.css">
<link rel="stylesheet" href="css/mio.css">
Run Code Online (Sandbox Code Playgroud)
如果我检查它们,它们包含index.html数据(头部主体dcc)
你能建议发生什么事吗?
尝试使用css文件的完整文件路径.例如..
<link rel="stylesheet" href="/assets/css/app.css">
Run Code Online (Sandbox Code Playgroud)
问题可能出在服务器端.由于角度应用程序是单页面ajax应用程序,因此服务器必须将所有请求重定向到index.html页面以外的资产.您的服务器可能正在返回index.html页面而不是您的css文件.