@@ -54,11 +54,11 @@ export function compileComponent(type: Type<any>, metadata: Component): void {
54
54
throw new Error ( error . join ( '\n' ) ) ;
55
55
}
56
56
57
- const sourceMapUrl = `ng://${ renderStringify ( type ) } /template.html` ;
57
+ const templateUrl = metadata . templateUrl || `ng:/ //${ renderStringify ( type ) } /template.html` ;
58
58
const meta : R3ComponentMetadataFacade = {
59
59
...directiveMetadata ( type , metadata ) ,
60
60
typeSourceSpan :
61
- compiler . createParseSourceSpan ( 'Component' , renderStringify ( type ) , sourceMapUrl ) ,
61
+ compiler . createParseSourceSpan ( 'Component' , renderStringify ( type ) , templateUrl ) ,
62
62
template : metadata . template || '' ,
63
63
preserveWhitespaces : metadata . preserveWhitespaces || false ,
64
64
styles : metadata . styles || EMPTY_ARRAY ,
@@ -71,7 +71,7 @@ export function compileComponent(type: Type<any>, metadata: Component): void {
71
71
interpolation : metadata . interpolation ,
72
72
viewProviders : metadata . viewProviders || null ,
73
73
} ;
74
- ngComponentDef = compiler . compileComponent ( angularCoreEnv , sourceMapUrl , meta ) ;
74
+ ngComponentDef = compiler . compileComponent ( angularCoreEnv , templateUrl , meta ) ;
75
75
76
76
// When NgModule decorator executed, we enqueued the module definition such that
77
77
// it would only dequeue and add itself as module scope to all of its declarations,
0 commit comments