2017-10-06 3 views
1

J'ai créé un exemple de projet en utilisant un exemple de matériau angulaire dans un plongeur. Cela a bien fonctionné jusqu'à hier aujourd'hui, ce ne fonctionne pas.Exécution impossible Exemple de matériau angulaire dans un plongeur

Même l'exemple de matériau angulaire ne fonctionne pas. Pouvez-vous s'il vous plaît me diriger dans la bonne direction.

Je recevais la même erreur que l'erreur originale de plongeur de matériau angulaire.

Error: (SystemJS) Unexpected value 'undefined' exported by the module 'PlunkerMaterialModule' 
    Error: Unexpected value 'undefined' exported by the module 'PlunkerMaterialModule' 
     at d (https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.7.2/zone.min.js:1:10303) 
     at syntaxError (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:1729:34) 
     at eval (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:15596:40) 
     at Array.forEach (<anonymous>) 
     at CompileMetadataResolver.getNgModuleMetadata (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:15594:49) 
     at CompileMetadataResolver.getNgModuleSummary (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:15507:52) 
     at eval (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:15580:72) 
     at Array.forEach (<anonymous>) 
     at CompileMetadataResolver.getNgModuleMetadata (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:15565:49) 
     at JitCompiler._loadModules (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:27000:70) 
     at JitCompiler._compileModuleAndComponents (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:26973:36) 
     at JitCompiler.compileModuleAsync (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:26902:37) 
     at PlatformRef_._bootstrapModuleWithZone (https://unpkg.com/@angular/core/bundles/core.umd.js:4568:25) 
     at PlatformRef_.bootstrapModule (https://unpkg.com/@angular/core/bundles/core.umd.js:4554:21) 
     at execute (https://run.plnkr.co/preview/cj8fyb96l00063c5srholji8p/main.ts!transpiled:108:65) 
    Error loading https://run.plnkr.co/preview/cj8fyb96l00063c5srholji8p/main.ts 
     at d (https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.7.2/zone.min.js:1:10303) 
     at syntaxError (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:1729:34) 
     at eval (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:15596:40) 
     at Array.forEach (<anonymous>) 
     at CompileMetadataResolver.getNgModuleMetadata (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:15594:49) 
     at CompileMetadataResolver.getNgModuleSummary (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:15507:52) 
     at eval (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:15580:72) 
     at Array.forEach (<anonymous>) 
     at CompileMetadataResolver.getNgModuleMetadata (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:15565:49) 
     at JitCompiler._loadModules (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:27000:70) 
     at JitCompiler._compileModuleAndComponents (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:26973:36) 
     at JitCompiler.compileModuleAsync (https://unpkg.com/@angular/compiler/bundles/compiler.umd.js:26902:37) 
     at PlatformRef_._bootstrapModuleWithZone (https://unpkg.com/@angular/core/bundles/core.umd.js:4568:25) 
     at PlatformRef_.bootstrapModule (https://unpkg.com/@angular/core/bundles/core.umd.js:4554:21) 
     at execute (https://run.plnkr.co/preview/cj8fyb96l00063c5srholji8p/main.ts!transpiled:108:65) 
    Error loading https://run.plnkr.co/preview/cj8fyb96l00063c5srholji8p/main.ts 

https://plnkr.co/edit/GKuQv2GnExGPEE3iWynF?p=preview https://material.angular.io/components/tabs/examples

Merci à l'avance.

Répondre

1

md préfixe a été annoncé comme obsolète dans 2.0.0-beta.11 et semble maintenant (2.0.0-beta.12) il est supprimé. Nous devrions utiliser mat à la place.

Ainsi, au lieu d'importer:

MdTabsModule 

et

<md-tab-group class="demo-tab-group"> 
    <md-tab label="Tab 1"> 

utilisation

MatTabsModule 

et

<mat-tab-group class="demo-tab-group"> 
    <mat-tab label="Tab 1"> 

Plunker [email protected]

Vous pouvez également définir la version matériau angulaire @ 2.0.0-beta.11 explicitement:

'@angular/material': 'https://unpkg.com/@angular/[email protected]/bundles/material.umd.js', 

Plunker

Je vous conseillons également de voir tous les exemples ici

+0

Thx. tu es un sauveur !! – CharanRoot

+1

@Jonnysai Voici tous les autres changements de '' 2.0.0-beta.12': https://github.com/angular/material2/blob/master/CHANGELOG.md#breaking-changes – Edric