@@ -60,7 +60,7 @@ interface InputMapping {
6060 * @internal
6161 */
6262function ng2ComponentInputs < T > ( mirror : ComponentMirror < T > ) : InputMapping [ ] {
63- return mirror . inputs . map ( ( input ) => ( { prop : input . propName , token : input . templateName } ) ) ;
63+ return mirror . inputs . map ( ( input ) => ( { prop : input . templateName , token : input . templateName } ) ) ;
6464} ;
6565
6666/**
@@ -339,13 +339,6 @@ export class UIView implements OnInit, OnDestroy {
339339 const explicitBoundProps = Object . keys ( bindings ) ;
340340 const mirror = reflectComponentType ( component ) ;
341341
342- // Returns the actual component property for a renamed an input renamed using `@Input('foo') _foo`.
343- // return the `_foo` property
344- const renamedInputProp = ( prop : string ) => {
345- const input = mirror . inputs . find ( ( i ) => i . templateName === prop ) ;
346- return ( input && input . propName ) || prop ;
347- } ;
348-
349342 // Supply resolve data to component as specified in the state's `bindings: {}`
350343 const explicitInputTuples = explicitBoundProps . reduce (
351344 ( acc , key ) => acc . concat ( [ { prop : key , token : bindings [ key ] } ] ) ,
@@ -367,7 +360,7 @@ export class UIView implements OnInit, OnDestroy {
367360 . map ( addResolvable )
368361 . filter ( ( tuple ) => tuple . resolvable && tuple . resolvable . resolved )
369362 . forEach ( ( tuple ) => {
370- componentRef . setInput ( tuple . resolvable . token , injector . get ( tuple . resolvable . token ) ) ;
363+ componentRef . setInput ( tuple . prop , injector . get ( tuple . resolvable . token ) ) ;
371364 } ) ;
372365 }
373366}
0 commit comments