@@ -60,7 +60,7 @@ interface InputMapping {
60
60
* @internal
61
61
*/
62
62
function 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 } ) ) ;
64
64
} ;
65
65
66
66
/**
@@ -339,13 +339,6 @@ export class UIView implements OnInit, OnDestroy {
339
339
const explicitBoundProps = Object . keys ( bindings ) ;
340
340
const mirror = reflectComponentType ( component ) ;
341
341
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
-
349
342
// Supply resolve data to component as specified in the state's `bindings: {}`
350
343
const explicitInputTuples = explicitBoundProps . reduce (
351
344
( acc , key ) => acc . concat ( [ { prop : key , token : bindings [ key ] } ] ) ,
@@ -367,7 +360,7 @@ export class UIView implements OnInit, OnDestroy {
367
360
. map ( addResolvable )
368
361
. filter ( ( tuple ) => tuple . resolvable && tuple . resolvable . resolved )
369
362
. forEach ( ( tuple ) => {
370
- componentRef . setInput ( tuple . resolvable . token , injector . get ( tuple . resolvable . token ) ) ;
363
+ componentRef . setInput ( tuple . prop , injector . get ( tuple . resolvable . token ) ) ;
371
364
} ) ;
372
365
}
373
366
}
0 commit comments