Angular4
可乐会唱歌
这个作者很懒,什么都没留下…
展开
-
Angular4 开发环境搭建
Angular4 开发环境搭建安装: Nodejs Angular CLI 自己喜欢的编译器 angular-cli安装命令: npm install -g angular-cli 新版:npm install -g @angular/cli 设置淘宝镜像:npm config set registry “https://registry.npm.taobao.org/” 安装完成使用 ng原创 2017-06-09 11:21:11 · 3499 阅读 · 0 评论 -
Angular2-5 input-file 选择相同文件不触发change解决方法
页面 <input #uploadImg class="d-none" type="file" (change)="imgCropper($event)"> ts @ViewChild('uploadImg') uploadImg: any imgCropper() { // 一系列操作 // 最后把input的value置空 this.upload...原创 2018-03-14 20:36:40 · 2034 阅读 · 0 评论 -
Angular2-6 实现吸顶效果指令
做项目的时候需要用到吸顶效果,可是没有找到单独的插件,所以自己实现一个吸顶的指令. 思路为检测需要吸顶的元素是否滚动到顶部,为其加上fixed属性 auto-fixed.directive.ts @Directive({ selector: '[txAutoFixed]' }) export class AutoFixedDirective { // 元素距离顶部的原始距离 to...原创 2018-07-20 15:51:50 · 1162 阅读 · 2 评论 -
angular2-6 修改ngx-weui 的infiniteloader实现吸顶效果
主要修改compontent组件,为其加入吸顶监听 export class InfiniteloaderComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy { private didScroll = false; private scrollEvent: any = null; private scro...原创 2018-07-20 16:13:48 · 609 阅读 · 0 评论