$ ng --version
Your global Angular CLI version (1.5.3) is greater than your local
version (1.5.0). The local Angular CLI version is used.
To disable this warning use "ng set --global warnings.versionMismatch=false".
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ â–³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 1.5.0
Node: 9.2.0
OS: linux x64
Angular: 5.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cdk: 5.0.0-rc0
@angular/cli: 1.5.0
@angular/material: 5.0.0-rc0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.2
typescript: 2.4.2
webpack: 3.8.1
<button (click)="emitMessage(true)"></button>ng serve --prodERROR in Error at /home/niko/WebstormProjects/new-tutorial/whatsapp-client-angularcli-material/src/app/components/new-message/new-message.component.ts.NewMessageComponent.html(3,13): Expected 0 arguments, but got 1.
Code compiles without issues.
That error seems to say that your emitMessage function expect to not receive any arguments, but you are sending one (the true value) in.
Errors like that happen on AOT builds (default for --prod) and try to inform you about errors in your templates. Builds should fail if you have errors there.
@filipesilva I'm sorry I completely missed that one. By the way wasn't angular 5 supposed to build AOT by default even for development? Whey didn't you choose to follow that path? Did you encounter any performance issue?
We tried it for a while in 1.5 betas and rc but the feedback that we got from users with big projects was that rebuilds were still too big. You can do ng serve --aot right now with 1.5 and it should always be faster than in 1.4, but depending on the size of the your project it might not be reasonable.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
That error seems to say that your
emitMessagefunction expect to not receive any arguments, but you are sending one (thetruevalue) in.Errors like that happen on AOT builds (default for
--prod) and try to inform you about errors in your templates. Builds should fail if you have errors there.