分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > IT知识

Angular5学习笔记 - 集成Bootstrap、Jquery、Tether(三)

发布时间:2023-09-06 01:39责任编辑:郭大石关键词:AngularBootstrap

一、添加配置

cnpm i bootstrap jquery tether --save

添加后效果

二、配置添加样式和js的引用

打开.angular-cli.json文件,在styles和scripts中添加链接。

需要注意添加的链接是下划线开头的目录

 ?????"styles": [ ???????"styles.css", ???????"../node_modules/_bootstrap@4.0.0@bootstrap/dist/css/bootstrap.min.css" ?????], ?????"scripts": [ ???????"../node_modules/_jquery@3.3.1@jquery/dist/jquery.min.js", ???????"../node_modules/_tether@1.4.3@tether/dist/js/tether.min.js", ???????"../node_modules/_bootstrap@4.0.0@bootstrap/dist/js/bootstrap.min.js" ?????],

三、修改Html测试效果

打开src/app/app.component.html文件修改内容为

<div class="container"> ?<h1>Hello World</h1></div>

四、重启服务查看运行效果

文字有向右偏移

参考:

http://study.163.com/course/courseLearn.htm?courseId=1004486002#/learn/video?lessonId=1048905052&courseId=1004486002

Angular5学习笔记 - 集成Bootstrap、Jquery、Tether(三)

原文地址:https://www.cnblogs.com/chuancheng/p/8361207.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved