[英]Include js, html and css files to an angular project
我有一個 javascript 項目。 我想在一個角度項目中運行它們。
我可以將 js 項目集成到 angular 項目中嗎?
我可以將這些 js 文件放到資產文件夾中嗎? 如果是,我們在哪里集成這些 HTML 和 CSS 文件?
請幫我解決這個問題
app/
----- controllers/
---------- mainController.js
---------- otherController.js
----- directives/
---------- mainDirective.js
---------- otherDirective.js
----- services/
---------- userService.js
---------- itemService.js
----- js/
---------- bootstrap.js
---------- jquery.js
----- app.js
views/
----- mainView.html
----- otherView.html
----- index.html
您可以將 css 或 html 文件導入到 index.html 文件中,如下所示:
import "~/filename.css"
您還可以通過在 angular.json 文件中包含 pathtofile 來包含 css 或 javascript 文件
"style:"pathtocss", "script":"pathtojs"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.