2017-08-14 4 views
-1

Angular 4 Material 2アプリを作成しましたが、Chromeですべてうまく動作しますが、Internet Explorerではページが空です。表示されるindex.htmlに<h1>を追加しましたが、content.component.htmlに1つ追加すると、コンポーネント全体のコードが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> 

Btw:Edge everythingsでもうまく動作しますが、IEで動作する必要があります... y追加のコードが必要です。私は解決策hereを見つけた事前

+0

はコンソールでエラーが発生するのですか? – Christian

+0

ポリフィルムを輸入しましたか? – Vega

+0

チェックhttps://stackoverflow.com/questions/43136792/angular-4-0-0-app-built-by-angular-cli--1-0-0-not-working-in-ie11 – Amit

答えて

1

感謝。

だけpolyfills.tsにこの行以下のコメントを削除します。

/** IE9, IE10 and IE11 requires all of the following polyfills. **/ 
関連する問題