我首先工作得很好,但是突然在构建应用程序时显示以下错误:-
ERROR in : Error: Expected an expression, but saw AST
at ensureExpressionMode (E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:7182:19)
at _AstToIrVisitor.visitImplicitReceiver (E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:7304:13)
at ImplicitReceiver.visit (E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:6289:28)
at convertActionBinding (E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:7095:49)
at E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:22304:26
at Array.forEach ()
at ViewBuilder._createElementHandleEventFn (E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:22300:22)
at nodes.(anonymous function) (E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:21898:27)
at E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:22262:26
at Array.map ()
at ViewBuilder._createNodeExpressions (E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:22261:43)
at ViewBuilder.build (E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:21733:27)
at E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:21732:67
at Array.forEach ()
at ViewBuilder.build (E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:21732:27)
at E:\xampp\htdocs\example\node_modules\@angular\compiler\bundles\compiler.umd.js:21732:67
角度版本:
Angular CLI: 7.3.9
Node: 10.15.0
OS: win32 x64
Angular: 7.2.15
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.9
@angular-devkit/build-angular 0.13.9
@angular-devkit/build-optimizer 0.13.9
@angular-devkit/build-webpack 0.13.9
@angular-devkit/core 7.3.9
@angular-devkit/schematics 7.3.9
@angular/cli 7.3.9
@ngtools/webpack 7.3.9
@schematics/angular 7.3.9
@schematics/update 0.13.9
rxjs 6.3.3
typescript 3.2.4
webpack 4.29.0