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 -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

java - How to implement an entity bound odata action in olingo v4.3 -