fix(compiler): calculate the right moduleUrl
This commit is contained in:
parent
883e0c48b1
commit
3a40cb1a85
|
@ -84,7 +84,7 @@ export class CompileMetadataResolver {
|
||||||
var templateMeta = null;
|
var templateMeta = null;
|
||||||
var changeDetectionStrategy = null;
|
var changeDetectionStrategy = null;
|
||||||
var viewProviders = [];
|
var viewProviders = [];
|
||||||
|
var moduleUrl = staticTypeModuleUrl(directiveType);
|
||||||
if (dirMeta instanceof ComponentMetadata) {
|
if (dirMeta instanceof ComponentMetadata) {
|
||||||
assertArrayOfStrings('styles', dirMeta.styles);
|
assertArrayOfStrings('styles', dirMeta.styles);
|
||||||
var cmpMeta = <ComponentMetadata>dirMeta;
|
var cmpMeta = <ComponentMetadata>dirMeta;
|
||||||
|
@ -101,6 +101,7 @@ export class CompileMetadataResolver {
|
||||||
if (isPresent(dirMeta.viewProviders)) {
|
if (isPresent(dirMeta.viewProviders)) {
|
||||||
viewProviders = this.getProvidersMetadata(dirMeta.viewProviders);
|
viewProviders = this.getProvidersMetadata(dirMeta.viewProviders);
|
||||||
}
|
}
|
||||||
|
moduleUrl = componentModuleUrl(this._reflector, directiveType, cmpMeta);
|
||||||
}
|
}
|
||||||
|
|
||||||
var providers = [];
|
var providers = [];
|
||||||
|
@ -117,10 +118,7 @@ export class CompileMetadataResolver {
|
||||||
selector: dirMeta.selector,
|
selector: dirMeta.selector,
|
||||||
exportAs: dirMeta.exportAs,
|
exportAs: dirMeta.exportAs,
|
||||||
isComponent: isPresent(templateMeta),
|
isComponent: isPresent(templateMeta),
|
||||||
type: this.getTypeMetadata(directiveType,
|
type: this.getTypeMetadata(directiveType, moduleUrl),
|
||||||
isPresent(cmpMeta) ?
|
|
||||||
componentModuleUrl(this._reflector, directiveType, cmpMeta) :
|
|
||||||
staticTypeModuleUrl(dirMeta)),
|
|
||||||
template: templateMeta,
|
template: templateMeta,
|
||||||
changeDetection: changeDetectionStrategy,
|
changeDetection: changeDetectionStrategy,
|
||||||
inputs: dirMeta.inputs,
|
inputs: dirMeta.inputs,
|
||||||
|
|
Loading…
Reference in New Issue