简体   繁体   English

将bootstrap或其他html主题导入我的angular 4应用程序

[英]Import bootstrap or other html theme to my angular 4 app

I want to import the bootstrap theme 3 or other html theme with their dependencies 我想导入bootstrap主题3或其他html主题及其依赖项
of javascript files in my angular 4 application. 我的angular 4应用程序中的javascript文件。 But I can't find anywhere how to import the javascript files. 但是我找不到任何地方如何导入javascript文件。 If finally import them,is safe to use bootstrap 3 or other html theme,without the possibility to break my app?? 如果最终导入它们,可以安全地使用bootstrap 3或其他html主题,而不会破坏我的应用程序? I prefer not use the ng2-bootstrap. 我更喜欢不使用ng2-bootstrap。 Thanks. 谢谢。

If you dont want to use ng2-bootstrap the easiest way is to import bootstrap from your index.html file like this 如果您不想使用ng2-bootstrap,最简单的方法是像这样从index.html文件导入bootstrap

<script src="https://cdnjs.cloudflare.com/ajax/libs/ng2-bootstrap/x.x.x/ng2-bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">

and just use the normal bootstrap classes in your html 并在html中使用普通的bootstrap类

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM