javascript - Unsupported number of argument for pure functions -


i have problem in angular2 (rc-1), passing array of strings function component binding. array length exceed 10 have error:

unsupported number of argument pure functions: 11

which sounds bit strange me because of 2 reason:

  • the array single parameter
  • why set limit of number of function params? (only thing have in mind performance optimization not use arguments keyword)

component selector:

<tb-infinite-scroll   [tbdataproperty]="[     'prop1',     'prop2',     'prop3',     'prop4',     'prop5',     'prop6',     'prop7',     'prop8',     'prop9',     'prop10',     'prop11'   ]"></tb-infinite-scroll> 

in component:

@component({   selector: 'tb-infinite-scroll',   inputs: [     'dataprop:tbdataproperty',   ],   /*...*/ })  export class tbinfinitescrollcomponent {    public dataprop:any = ''; 

then inside component template:

<div *ngif="sharedservices.typeof(dataprop) === 'object'">     <div class="tb-infinite-scroll__cell" *ngfor="let prop of dataprop">{{row[prop]}}</div> </div> 

stack trace:

browser_adapter.js:77 error: uncaught (in promise): unsupported number of argument pure functions: 11     @ resolvepromise (zone.js:538)     @ promisecompleter.reject (zone.js:515)     @ eval (application_ref.js:295)     @ zonedelegate.invoke (zone.js:323)     @ object.ngzoneimpl.inner.inner.fork.oninvoke (ng_zone_impl.js:45)     @ zonedelegate.invoke (zone.js:322)     @ zone.run (zone.js:216)     @ zone.js:571     @ zonedelegate.invoketask (zone.js:356)     @ object.ngzoneimpl.inner.inner.fork.oninvoketask (ng_zone_impl.js:36) 

any idea causing issue/any workarounds?

thanks in advance.

i expect work:

<tb-infinite-scroll   [tbdataproperty]="tbdataproperty"></tb-infinite-scroll> 
@component({   selector: 'parent-component',   /*...*/ })  export class parentcomponent {   tbdataproperty = [     'prop1',     'prop2',     'prop3',     'prop4',     'prop5',     'prop6',     'prop7',     'prop8',     'prop9',     'prop10',     'prop11'   ]; 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -