Unable to run sample Angular material in plunker

I created one sample project using Angular Material Example in plunker. it worked until yesterday, while it did not work.

Even Angular Sample material does not work. could you point me in the right direction.

I was getting the same error as the original plunker error of Angular stuff.

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

Thanks at Advance.

+1
source share
1 answer
Prefix

md was declared obsolete in version 2.0.0-beta.11 and now looks like ( 2.0.0-beta.12 ), it has been removed. Instead, use mat .

So, instead of importing:

 MdTabsModule 

and

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

use

 MatTabsModule 

and

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

Plunker Example@2.0.0-beta.12

Or you can explicitly set the angular version material to @ 2.0.0-beta.11:

 '@angular/material': 'https://unpkg.com/@angular/ material@2.0.0-beta.11 /bundles/material.umd.js', 

Plunker

I also advise you to see all the examples here.

+1
source

Source: https://habr.com/ru/post/1272431/


All Articles