33 Component , ComponentFactoryResolver , ViewContainerRef , Input , ComponentRef , Type ,
44 ReflectiveInjector , ViewChild , Injector , Inject
55} from '@angular/core' ;
6+ import { ReflectorReader , reflector } from '../private_import_core' ;
67
78import { UIRouter } from "../../router" ;
89import { trace } from "../../common/trace" ;
@@ -27,12 +28,10 @@ interface InputMapping {
2728 prop : string ;
2829}
2930
30- declare var Reflect : any ;
31-
3231/** @hidden */
3332const ng2ComponentInputs = ( ng2CompClass : Type < any > ) => {
3433 /** Get "@Input('foo') _foo" inputs */
35- let props = Reflect [ 'getMetadata' ] ( ' propMetadata' , ng2CompClass ) ;
34+ let props = reflector . propMetadata ( ng2CompClass ) ;
3635 let _props = Object . keys ( props || { } )
3736 // -> [ { key: string, anno: annotations[] } ] tuples
3837 . map ( key => ( { key, annoArr : props [ key ] } ) )
@@ -44,7 +43,7 @@ const ng2ComponentInputs = (ng2CompClass: Type<any>) => {
4443 . map ( tuple => ( { token : tuple . anno . bindingPropertyName || tuple . key , prop : tuple . key } ) ) ;
4544
4645 /** Get "inputs: ['foo']" inputs */
47- let inputs = Reflect [ 'getMetadata' ] ( ' annotations' , ng2CompClass )
46+ let inputs = reflector . annotations ( ng2CompClass )
4847 // Find the ComponentMetadata class annotation
4948 . filter ( x => x instanceof Component && ! ! x . inputs )
5049 // Get the .inputs string array
0 commit comments