zoukankan      html  css  js  c++  java
  • AngularJS5.0 (第二篇)--安装bootstrap4

    第一步,新建ng5项目

      ng new testAngular

      cd testAngular

      npm install @angular-devkit/core (如果报"Cannot find module '@angular-devkit/core' 错误的话",需要安装这个模块,否则跳过这个步骤)

      ng serve 启动项目

    第二步,安装jquery+bootstrap4.0+popper.js

      npm install jquery bootstrap popper.js --save

      检查package.json文件查看是否安装成功:

      

    第三步,打开.angular-cli.json文件,配置bootstrap的css和js目录:

      "styles": [
        "styles.css",
        "../node_modules/bootstrap/dist/css/bootstrap.min.css"
      ],
      "scripts": [
        "../node_modules/jquery/dist/jquery.min.js",
        "../node_modules/popper.js/dist/popper.min.js",
        "../node_modules/bootstrap/dist/js/bootstrap.min.js"
      ],
      

    再次,ng serve 打开http://localhost:4200查看页面已经具有bootstrap的效果
      

      

  • 相关阅读:
    MySQL优化
    MySQL 的 SQL 操作
    笔记本电脑同时使用两个网络
    top
    logrotate
    正则表达式学习总结
    HttpClient parameter 和body 传输同时进行
    Node.js背景
    前后端分离的理解
    shiro 的subject 以及Context 对象的具体的含义。
  • 原文地址:https://www.cnblogs.com/sdorm/p/8805669.html
Copyright © 2011-2022 走看看