@ -20,7 +20,7 @@ import {NgControl} from 'angular2/src/common/forms/directives/ng_control';
|
||||
import {CONST_EXPR, looseIdentical, isPresent} from 'angular2/src/facade/lang';
|
||||
import {ListWrapper} from 'angular2/src/facade/collection';
|
||||
|
||||
export const RADIO_VALUE_ACCESSOR = CONST_EXPR(new Provider(
|
||||
export const RADIO_VALUE_ACCESSOR = CONST_EXPR(new Provider(
|
||||
NG_VALUE_ACCESSOR, {useExisting: forwardRef(() => RadioControlValueAccessor), multi: true}));
|
||||
|
||||
|
||||
|
@ -70,7 +70,7 @@ export interface StaticReflectorHost {
|
||||
*
|
||||
* This token is unique for a moduleId and name and can be used as a hash table key.
|
||||
*/
|
||||
export class StaticSymbol {
|
||||
export class StaticSymbol implements ModuleContext {
|
||||
constructor(public moduleId: string, public filePath: string, public name: string) {}
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ export class StaticReflector implements ReflectorReader {
|
||||
if (isClassMetadata(declarationValue)) {
|
||||
result = staticSymbol;
|
||||
} else {
|
||||
const newModuleContext =
|
||||
let newModuleContext =
|
||||
new ModuleContext(staticSymbol.moduleId, staticSymbol.filePath);
|
||||
result = _this.simplify(newModuleContext, declarationValue, crossModules);
|
||||
}
|
||||
@ -382,9 +382,6 @@ export class StaticReflector implements ReflectorReader {
|
||||
}
|
||||
|
||||
private getTypeMetadata(type: StaticSymbol): {[key: string]: any} {
|
||||
if (!(type instanceof StaticSymbol)) {
|
||||
throw new Error('not static type');
|
||||
}
|
||||
let moduleMetadata = this.getModuleMetadata(type.filePath);
|
||||
let result = moduleMetadata['metadata'][type.name];
|
||||
if (!isPresent(result)) {
|
||||
|
Reference in New Issue
Block a user