如何替换SAP Spartacus启动Component -app-root
生活随笔
收集整理的這篇文章主要介紹了
如何替换SAP Spartacus启动Component -app-root
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在SAP Spartacus app.module.ts里,隨便定義一個簡單的Component:
@Component({selector: "app-root",template: `<h1>Hello</h1>` }) export class AppComponent {}index.html里,將dummy Component的selector維護進去:
運行時效果:locateHostElement
使用瀏覽器原生的document.querySelector方法,拿到app-root對應的dom:
更多Jerry的原創文章,盡在:“汪子熙”:
總結
以上是生活随笔為你收集整理的如何替换SAP Spartacus启动Component -app-root的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 微软分享有关 Windows 更新 UU
- 下一篇: SAP Spartacus里的route