12 2019 档案
摘要:ng 引入jquery 1.在项目中 npm install --save jquery 在对应组件中加入 import * as $ from "jquery"; 在angular.json中的 scripts:[]中加入 "./node_modules/jquery/dist/jquery.js
阅读全文
摘要:动画过渡两种方法 1.使用angular+animation实现 在app-module.ts中引入 BrowserAnimationsModule 1.import { BrowserAnimationsModule} from '@angular/platform-browser/animati
阅读全文
摘要:判断是否是微信浏览器、微信端打开 var wx= (function(){ return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1 } )(); if(wx){ $(".android").click(fun
阅读全文
摘要://判断访问设备,方便后面针对不同设备调用代码 if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|w
阅读全文
摘要:兼容iphone4/4s: @media (device-height:480px) and (-webkit-min-device-pixel-ratio:2){ }兼容iphone5 : @media (device-height:568px) and (-webkit-min-device-p
阅读全文
摘要:1.在项目中使用命令 npm i bootstrap -s来创建bootstrap 2.创建完成之后在 angular.json中引入进去 "styles": [ "src/styles.scss", "./node_modules/bootstrap/dist/css/bootstrap.min.
阅读全文
摘要:1.进入阿里巴巴矢量图标库中,选择需要下载的图标,添加进项目中 2.进去项目选择Font class 模式,然后下载到本地 3.解压下载的压缩包,把.css/.svg/.ttf/.woff/.woff2文件放入到ng项目中的assets中 其中/.svg/.ttf/.woff/.woff2在asse
阅读全文
摘要:1.ng build --base --href /前缀名/--common - chunk --output-hashing=all --optimization 2.更改ts和html中的路径,将路径改成./xxx/xxx/xxx eg: ./assests/img/backin.img
阅读全文