angular - ng build -prod ERROR: Supplied parameters do not match any signature of call target -


generating production version @angular/cli command:

ng build --environment prod -prod

in dev mode work fine, source code is:

ts:

search()  {     this.router.navigate(["search", this.term]); } 

html:

<form (submit)="search(term)">      <input type="text" name="term" [(ngmodel)]="term" placeholder="how can today?"/>     <a (click)="search()"><span class="icon-search"></span></a> </form> 

first, 'search' function not have parameters or return type. know inferred practice.

second calling 'search' parameter in event binding 'submit' , what's causing issue.

use '(submit)="search()"'


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -