如何替换SAP Spartacus启动Component -app-root
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                如何替换SAP Spartacus启动Component -app-root
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.                        
                                在SAP Spartacus app.module.ts里,隨便定義一個(gè)簡(jiǎn)單的Component:
@Component({selector: "app-root",template: `<h1>Hello</h1>` }) export class AppComponent {}index.html里,將dummy Component的selector維護(hù)進(jìn)去:
運(yùn)行時(shí)效果:locateHostElement
使用瀏覽器原生的document.querySelector方法,拿到app-root對(duì)應(yīng)的dom:
更多Jerry的原創(chuàng)文章,盡在:“汪子熙”:
 
總結(jié)
以上是生活随笔為你收集整理的如何替换SAP Spartacus启动Component -app-root的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
                            
                        - 上一篇: 微软分享有关 Windows 更新 UU
 - 下一篇: 曝今年依然有一大批10W充电手机将发布