행운을 들이지 않고 각도 앱에 재질 디자인을 추가하려고합니다.각도 앱 - 재질 디자인
자료 디자인을 설치했는데 모든 모듈을 app.moduel.ts
파일에 추가했지만 구성 요소가 매우 나쁩니다.
나는이 메시지 : Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide:
https://material.angular.io/guide/theming
나는 index.html 파일
<link href="node_modules/@angular/material/prebuilt-themes/indigo-pink.css" rel="stylesheet">
의 머리에 대한 링크를 추가하지만, 어떤 이유로 나는 Status Code:404 Not Found
를 얻을. CSS 파일을 애셋에 추가하려고했는데 작동하지 않았습니다.
github의 소재 디자인 샘플 앱에서 모든 테마 CSS 파일에 대한 링크가 없으므로 조금 이상합니다.
https://github.com/jelbourn/material2-app/blob/master/src/index.html
http://localhost:4200/node_modules/@angular/material/prebuilt-themes/indigo-pink.css는
내 index.html 파일은 다음과 같습니다
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>M2App</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="node_modules/@angular/material/prebuilt-themes/indigo-pink.css" rel="stylesheet">
</head>
<body>
<app-root>Loading...</app-root>
</body>
</html>