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
Post a Comment