-1
我已經編寫了一個Angular 4 Material 2應用程序,所有工作均在Chrome中正常工作,但在Internet Explorer上該頁面爲空。我添加了一個<h1>
來顯示index.html,但添加一個到我的content.component.html不起作用,即使整個組件的代碼沒有添加到DOM。 在Internet Explorer 11上未顯示角度組件
的index.html(<h1>Test</h1>
示出了在IE):
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>ITEM Projekte</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 rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">
</head>
<body>
<h1>Test</h1>
<app-root></app-root>
</body>
</html>
app.component.html(<h1>Test</h1>
不能在IE中顯示):
<h1>Test</h1>
<md-card>
<md-card-title>ITEM Projekt anlegen</md-card-title>
<md-card-subtitle>PROJEKTDATEN</md-card-subtitle>
<md-card-content>
<div style="width: 100%; ">
<md-input-container *ngFor="let item of projektdaten" style="margin-right: 15px; display: inline-block; ">
<label style="width: 120px; display: block;">{{item.identifier}}:</label><input mdInput name={{item.identifier}} style="width: 150px; " (keyup)="setProjectData(item, $event.target.value)">
</md-input-container>
</div>
<div style="margin-top: 20px;">
<md-radio-group>
<md-radio-button value="1" style="margin-right: 30px; ">Neubau</md-radio-button>
<md-radio-button value="2">Umbau</md-radio-button>
</md-radio-group>
</div>
</md-card-content>
<md-card-subtitle>MATERIALKOSTEN</md-card-subtitle>
<md-card-content>
<md-input-container><label>Test</label><input mdInput></md-input-container>
</md-card-content>
<md-card-subtitle>PERSONALKOSTEN</md-card-subtitle>
<md-card-content>
</md-card-content>
</md-card>
順便說一句:在邊緣萬物也工作得很好,但我需要它在IE中工作... 請讓我知道,如果y你需要任何額外的代碼。
在此先感謝
你在控制檯收到一個錯誤? – Christian
你有進口pollyfils嗎? – Vega
檢查https://stackoverflow.com/questions/43136792/angular-4-0-0-app-built-by-angular-cli-1-0-0-not-working-in-ie11 – Amit