我正在考慮使用非角度傳輸來異步加載模板(實際上,如果模板是字符串或來自請求的承諾,我想要確定構建時間),就像在Angular 2中作爲模板請求承諾
@Component({
directives: [],
selector: 'some',
template: System.import('./some-template!text')
})
export class SomeComponent {}
承諾(來自請求)是否可以作爲組件模板提供?
指令/組件是否有某種templateProvider
功能?
你是否在談論'templateUrl'的相對路徑? –
@PardeepJain我正在考慮更換templateUrl,因爲我想確定模板是否在編譯時同步加載(使用'require')或異步加載(使用'System.import')。 – estus