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" ;
@@ -26,12 +27,10 @@ interface InputMapping {
2627 prop : string ;
2728}
2829
29- declare var Reflect : any ;
30-
3130/** @hidden */
3231const ng2ComponentInputs = ( ng2CompClass : Type < any > ) => {
3332 /** Get "@Input('foo') _foo" inputs */
34- let props = Reflect [ 'getMetadata' ] ( ' propMetadata' , ng2CompClass ) ;
33+ let props = reflector . propMetadata ( ng2CompClass ) ;
3534 let _props = Object . keys ( props || { } )
3635 // -> [ { key: string, anno: annotations[] } ] tuples
3736 . map ( key => ( { key, annoArr : props [ key ] } ) )
@@ -43,7 +42,7 @@ const ng2ComponentInputs = (ng2CompClass: Type<any>) => {
4342 . map ( tuple => ( { token : tuple . anno . bindingPropertyName || tuple . key , prop : tuple . key } ) ) ;
4443
4544 /** Get "inputs: ['foo']" inputs */
46- let inputs = Reflect [ 'getMetadata' ] ( ' annotations' , ng2CompClass )
45+ let inputs = reflector . annotations ( ng2CompClass )
4746 // Find the ComponentMetadata class annotation
4847 . filter ( x => x instanceof Component && ! ! x . inputs )
4948 // Get the .inputs string array
0 commit comments