我剛從Angular 2.4.7和Angular CLI 1.0.0-beta.31將我的項目升級到Angular 4.0.0和Angular CLI 1.0.0。自升級以來,我收到以下錯誤:升級Angular獲取404未找到索引中的腳本
font-awesome.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
material-icons.css Failed to load resource: the server responded with a status of 404 (Not Found)
global-styles.css Failed to load resource: the server responded with a status of 404 (Not Found)
hammer.js Failed to load resource: the server responded with a status of 404 (Not Found)
這些涉及我的index.html下面的腳本引用。自升級以來我沒有更改結構,有誰知道我爲什麼會遇到這些錯誤?
的Index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Tellurium Platform</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" href="./app/library/css/font-awesome.min.css">
<link rel="stylesheet" href="./global-styles.css">
<link rel="stylesheet" href="./app/library/css/material-icons.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<!--For Material 2 slider elements-->
<script src="./app/library/js/hammer.js"></script>
</head>
<body class="canvas">
<app-root>Loading...</app-root>
</body>
</html>
謝謝,但你可以看到有最新的angulae CLI是一個錯誤使用與index.html位於同一目錄中的global-styles-css。 Pardeep答案是正確的,依賴關係現在必須是angular-cli.json –