{"id":39285,"date":"2022-08-25T18:50:51","date_gmt":"2023-10-03T05:48:03","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/"},"modified":"2024-01-15T10:12:51","modified_gmt":"2024-01-15T02:12:51","slug":"%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/","title":{"rendered":"\u51c6\u5907\u5728Angular\u4e2d\u4f7f\u7528Bootstrap 5"},"content":{"rendered":"<h1>\u9996\u5148 \u6216 \u9996\u5148<\/h1>\n<p>\u6700\u8fd1\uff0cBootstrap 5 alpha\u7248\u672c\u5df2\u53d1\u5e03\u3002<br \/>\n\u5220\u9664\u4e86\u4e0ejQuery\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u53ef\u4ee5\u4e0eAngular\u4e00\u8d77\u7b80\u6d01\u5730\u4f7f\u7528\u3002<br \/>\n\u8fd9\u662f\u5173\u4e8e\u6b64\u4e8b\u7684\u5907\u5fd8\u5f55\u3002<\/p>\n<h1>\u521b\u5efa\u4e00\u4e2aAngular\u9879\u76ee\u3002<\/h1>\n<p>\u9996\u5148\uff0c\u4e3a\u4e86\u6d4b\u8bd5\u76ee\u7684\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\u3002<br \/>\n\u5728\u4efb\u610f\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a&#8221;angular-bootstrap-test&#8221;\u7684\u9879\u76ee\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> ng new angular-bootstrap-test\r\n<span class=\"gp\">$<\/span> ? Would you like to add Angular routing? <span class=\"o\">(<\/span>y\/N<span class=\"o\">)<\/span> y\r\n<span class=\"gp\">$<\/span> Which stylesheet format would you like to use? <span class=\"o\">(<\/span>Use arrow keys<span class=\"o\">)<\/span>\r\n<span class=\"gp\">  &gt;<\/span> CSS\r\n<span class=\"go\">    Sass\r\n    Less\r\n    Stylus\r\n<\/span><\/code><\/pre>\n<h1>\u5b89\u88c5Bootstrap5<\/h1>\n<p>\u524d\u5f80\u6240\u521b\u5efa\u7684\u9879\u76ee\u76ee\u5f55\uff0c\u5e76\u4f7f\u7528npm\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">$<\/span> <span class=\"nb\">cd <\/span>angular-bootstrap-test\r\n<span class=\"gp\">$<\/span> npm <span class=\"nb\">install <\/span>popper.js <span class=\"nt\">--save<\/span>\r\n<span class=\"gp\">$<\/span> npm <span class=\"nb\">install <\/span>bootstrap@next\r\n<\/code><\/pre>\n<p>\u51fa\u73b0\u4e86fsevents\u7684\u4f9d\u8d56\u9519\u8bef\uff0c\u4f46\u662f\u770b\u8d77\u6765\u5b83\u662f\u4e00\u4e2a\u53ea\u9002\u7528\u4e8eMacOS\u7684\u6a21\u5757\uff0c\u539f\u56e0\u662f\u60f3\u8981\u7684{&#8220;os&#8221;:&#8221;darwin&#8221;&#8230;<br \/>\n\u5982\u679c\u5b89\u88c5\u672c\u8eab\u6210\u529f\u4e86\u4f46\u8fd8\u6709\u7591\u8651\uff0c\u53ef\u4ee5\u4f7f\u7528&#8221;&#8211;no-optional&#8221;\u9009\u9879\u6765\u5b89\u88c5\u3002<br \/>\n\u8fd9\u6837\u5c31\u53ef\u4ee5\u5b89\u88c5Bootstrap5\u5e76\u5728angular-bootstrap-test\/node_modules\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2abootstrap\u6587\u4ef6\u5939\u3002<\/p>\n<h1>\u4e3a\u4f7f\u7528\u505a\u51c6\u5907<\/h1>\n<p>\u4e3a\u4e86\u4f7f\u7528Bootstrap 5\uff0c\u9700\u8981\u7f16\u8f91angular.json\u3002<\/p>\n<pre class=\"post-pre\"><code>\"style\":[\r\n    \"src\/styles.css\" ,\r\n    \"node_modules\/bootstrap\/dist\/css\/bootstrap.css\"  \/\/\u8ffd\u52a0\r\n],\r\n\"scripts\":[\r\n    \"node_modules\/bootstrap\/dist\/js\/bootstrap.js\"  \/\/\u8ffd\u52a0\r\n],\r\n<\/code><\/pre>\n<p>\u73b0\u5728\u53ef\u4ee5\u4f7f\u7528\u4e86\u3002<\/p>\n<h1>\u5c1d\u8bd5\u4f7f\u7528<\/h1>\n<p>\u5728 app.component.html \u4e2d\u968f\u610f\u6dfb\u52a0\u4e00\u4e9b\u5907\u6ce8\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;p class=\"bg-dark text-light\"&gt;Bootstrap test&lt;\/p&gt;\r\n<\/code><\/pre>\n<h1>\u8bf7\u53c2\u8003<\/h1>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148 \u6216 \u9996\u5148 \u6700\u8fd1\uff0cBootstrap 5 alpha\u7248\u672c\u5df2\u53d1\u5e03\u3002 \u5220\u9664\u4e86\u4e0ejQuery\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u53ef\u4ee5\u4e0eA [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-39285","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u51c6\u5907\u5728Angular\u4e2d\u4f7f\u7528Bootstrap 5 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u51c6\u5907\u5728angular\u4e2d\u4f7f\u7528bootstrap-5\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u51c6\u5907\u5728Angular\u4e2d\u4f7f\u7528Bootstrap 5\" \/>\n<meta property=\"og:description\" content=\"\u9996\u5148 \u6216 \u9996\u5148 \u6700\u8fd1\uff0cBootstrap 5 alpha\u7248\u672c\u5df2\u53d1\u5e03\u3002 \u5220\u9664\u4e86\u4e0ejQuery\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u53ef\u4ee5\u4e0eA [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u51c6\u5907\u5728angular\u4e2d\u4f7f\u7528bootstrap-5\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-03T05:48:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T02:12:51+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/\",\"name\":\"\u51c6\u5907\u5728Angular\u4e2d\u4f7f\u7528Bootstrap 5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-10-03T05:48:03+00:00\",\"dateModified\":\"2024-01-15T02:12:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u51c6\u5907\u5728Angular\u4e2d\u4f7f\u7528Bootstrap 5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u51c6\u5907\u5728Angular\u4e2d\u4f7f\u7528Bootstrap 5 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u51c6\u5907\u5728angular\u4e2d\u4f7f\u7528bootstrap-5\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u51c6\u5907\u5728Angular\u4e2d\u4f7f\u7528Bootstrap 5","og_description":"\u9996\u5148 \u6216 \u9996\u5148 \u6700\u8fd1\uff0cBootstrap 5 alpha\u7248\u672c\u5df2\u53d1\u5e03\u3002 \u5220\u9664\u4e86\u4e0ejQuery\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u53ef\u4ee5\u4e0eA [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u51c6\u5907\u5728angular\u4e2d\u4f7f\u7528bootstrap-5\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-10-03T05:48:03+00:00","article_modified_time":"2024-01-15T02:12:51+00:00","author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/","name":"\u51c6\u5907\u5728Angular\u4e2d\u4f7f\u7528Bootstrap 5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-10-03T05:48:03+00:00","dateModified":"2024-01-15T02:12:51+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u51c6\u5907\u5728Angular\u4e2d\u4f7f\u7528Bootstrap 5"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%87%86%e5%a4%87%e5%9c%a8angular%e4%b8%ad%e4%bd%bf%e7%94%a8bootstrap-5%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/39285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=39285"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/39285\/revisions"}],"predecessor-version":[{"id":58520,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/39285\/revisions\/58520"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=39285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=39285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=39285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}