Skip to content

Commit

Permalink
fix(compiler): calculate the right moduleUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
tbosch authored and alexeagle committed May 3, 2016
1 parent 883e0c4 commit 3a40cb1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions modules/@angular/compiler/src/metadata_resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class CompileMetadataResolver {
var templateMeta = null;
var changeDetectionStrategy = null;
var viewProviders = [];

var moduleUrl = staticTypeModuleUrl(directiveType);
if (dirMeta instanceof ComponentMetadata) {
assertArrayOfStrings('styles', dirMeta.styles);
var cmpMeta = <ComponentMetadata>dirMeta;
Expand All @@ -101,6 +101,7 @@ export class CompileMetadataResolver {
if (isPresent(dirMeta.viewProviders)) {
viewProviders = this.getProvidersMetadata(dirMeta.viewProviders);
}
moduleUrl = componentModuleUrl(this._reflector, directiveType, cmpMeta);
}

var providers = [];
Expand All @@ -117,10 +118,7 @@ export class CompileMetadataResolver {
selector: dirMeta.selector,
exportAs: dirMeta.exportAs,
isComponent: isPresent(templateMeta),
type: this.getTypeMetadata(directiveType,
isPresent(cmpMeta) ?
componentModuleUrl(this._reflector, directiveType, cmpMeta) :
staticTypeModuleUrl(dirMeta)),
type: this.getTypeMetadata(directiveType, moduleUrl),
template: templateMeta,
changeDetection: changeDetectionStrategy,
inputs: dirMeta.inputs,
Expand Down

0 comments on commit 3a40cb1

Please sign in to comment.