3
3
Component , ComponentFactoryResolver , ViewContainerRef , Input , ComponentRef , Type ,
4
4
ReflectiveInjector , ViewChild , Injector , Inject
5
5
} from '@angular/core' ;
6
+ import { ReflectorReader , reflector } from '../private_import_core' ;
6
7
7
8
import { UIRouter } from "../../router" ;
8
9
import { trace } from "../../common/trace" ;
@@ -27,12 +28,10 @@ interface InputMapping {
27
28
prop : string ;
28
29
}
29
30
30
- declare var Reflect : any ;
31
-
32
31
/** @hidden */
33
32
const ng2ComponentInputs = ( ng2CompClass : Type < any > ) => {
34
33
/** Get "@Input('foo') _foo" inputs */
35
- let props = Reflect [ 'getMetadata' ] ( ' propMetadata' , ng2CompClass ) ;
34
+ let props = reflector . propMetadata ( ng2CompClass ) ;
36
35
let _props = Object . keys ( props || { } )
37
36
// -> [ { key: string, anno: annotations[] } ] tuples
38
37
. map ( key => ( { key, annoArr : props [ key ] } ) )
@@ -44,7 +43,7 @@ const ng2ComponentInputs = (ng2CompClass: Type<any>) => {
44
43
. map ( tuple => ( { token : tuple . anno . bindingPropertyName || tuple . key , prop : tuple . key } ) ) ;
45
44
46
45
/** Get "inputs: ['foo']" inputs */
47
- let inputs = Reflect [ 'getMetadata' ] ( ' annotations' , ng2CompClass )
46
+ let inputs = reflector . annotations ( ng2CompClass )
48
47
// Find the ComponentMetadata class annotation
49
48
. filter ( x => x instanceof Component && ! ! x . inputs )
50
49
// Get the .inputs string array
0 commit comments