无法在插件中运行Angular材质示例 [英] Unable run Angular material example in plunker
问题描述
我使用了plunker中的Angular Material示例创建了一个示例项目.到今天为止,它的工作情况还不错,直到今天它仍然不工作.
I created one sample project using Angular Material example in plunker. its worked fine till yesterday today its not working.
即使角材料"示例也不起作用.你能指出我正确的方向吗?
Even Angular Material example is not working. can you please point me into right direction.
我遇到的错误与原始Angular材质塞子错误相同.
I was getting same error as original Angular material plunker error.
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
预先感谢.
推荐答案
md
前缀在2.0.0-beta.11中被宣布为已弃用,现在看来( 2.0.0-beta.12 >)它被删除.我们应该改用mat
.
md
prefix was announced as deprecated in 2.0.0-beta.11 and seems now(2.0.0-beta.12) it is removed. We should use mat
instead.
所以不要导入:
MdTabsModule
和
<md-tab-group class="demo-tab-group">
<md-tab label="Tab 1">
使用
MatTabsModule
和
<mat-tab-group class="demo-tab-group">
<mat-tab label="Tab 1">
Plunker Example@2.0.0-beta.12
或者您可以将角材料版本明确设置为@ 2.0.0-beta.11:
Or you can set angular-material version to @2.0.0-beta.11 explicitly:
'@angular/material': 'https://unpkg.com/@angular/material@2.0.0-beta.11/bundles/material.umd.js',
Plunker
我还建议您在此处查看所有示例
I also advice you to see all examples here
这篇关于无法在插件中运行Angular材质示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!