0
我有一個新的角度創建4 CLI與下列包安裝的應用程序:角4引導4不能正常呈現
npm install [email protected] jquery tether popper.js --save
.angular-cli.json提取:
"styles": [
"styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.slim.min.js",
"../node_modules/tether/dist/js/tether.min.js",
"../node_modules/popper.js/dist/umd/popper.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js"
],
有了這個設置我有一個導航欄組件,其代碼爲the official Bootstrap 4 page,它不能正確呈現: 即使瀏覽器處於全屏模式,背景顏色丟失,「Navbar」和ggler被交換。
但是,當我使用Bootstrap 4 CDN時,它可以很好地工作。在這兩種情況下,除了導航欄外,其他任何樣式都如預期的那樣。
那麼,我在使用本地安裝的Bootstrap時做了什麼錯誤?
你看了bootstrap 4 navbar API,它一直在變劇烈地。 –
您正在使用Bootrap 4測試版,但鏈接了alpha文檔。 – hdk
@hdk謝謝,你是對的!我怎麼能錯過! – mikebrsv