Angular4错误提示的说明(二)

前端之家收集整理的这篇文章主要介绍了Angular4错误提示的说明(二)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
compiler.es5.js:1694 Uncaught Error: Unexpected value 'XxxModule' imported by the module 'AppModule'. Please add a @NgModule annotation.
    at SyntaxError (compiler.es5.js:1694)
    at compiler.es5.js:15398
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver.getNgModuleMetadata (compiler.es5.js:15381)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._loadModules (compiler.es5.js:26826)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (compiler.es5.js:26799)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (compiler.es5.js:26728)
    at PlatformRef_.webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_._bootstrapModuleWithZone (core.es5.js:4536)
    at PlatformRef_.webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_.bootstrapModule (core.es5.js:4522)

看起来无从着手,好像是编译器的问题。试试-aot参数吧。

ng serve -aot

猜你在找的Angularjs相关文章