是否可以將angular2 cli 4.0發佈到網站上的iframe中,以便預覽angular2組件?我會很感激這個問題的答案。網站上的角度2 iframe
5
A
回答
3
您可以運行角度應用程序並將其加載到iframe中。在你的應用程序中,你應該創建一個只有一個組件可見的路線。然後你可以將它加載到其他網站的iframe中。
例:你的組件將可在http://localhost:4200/components/card
,然後在你的網站,你可以加載它: <iframe src="http://localhost:4200/components/card></iframe>
1
比方說你的角度應用在http://localhost:4200
託管這是默認的URL,當您運行ng serve
應用只需添加<iframe src='http://localhost:4200'>
在你的web應用程序和角度的應用程序將你的網站裏面加載。
相關問題
- 1. iframe中網站的高度
- 2. HTTPS網站上的Youtube Iframe
- 3. 網站上的iframe注入
- 4. 角2 - IFRAME
- 5. ios上的角度/離子iframe問題
- 6. 網站由於iFrame而在moble上的響應速度變慢?
- 7. 名單在我的角度網站
- 8. 網站上的iFrame不保存曲奇
- 9. 在您的網站上設置htaccess iframe
- 10. iphone上的網站寬度
- 11. 角度2,角度2通用差異
- 12. 角2網站 - 啓用觸摸
- 13. 茉莉花預覽網站角2 cli
- 14. 訪問iframe網站
- 15. cakephp網站內iframe
- 16. 的iFrame的網站樓下
- 17. 以角度打開一個新網站
- 18. 如何清除kendo ui角度2網格上的數據
- 19. 在網站上緩慢加載iframe
- 20. 在Flash網站上使用iFrame
- 21. 在https網站上創建iframe
- 22. iframe上不顯示隨機網站
- 23. 發佈網站上使用ASP MVC和角2
- 24. 劍道角2網格高度
- 25. 角度2材料網格列表卡
- 26. 角度2與visualpack上的webpack
- 27. 文件上傳的角度2(更改)
- 28. browser.wait在量角器的非角度網站
- 29. 試圖運行硒 - 在角度網站上測試
- 30. 量角器 - 非角度OAuth登錄重定向到角度網站