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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -