会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
山根花理
博客园
首页
新随笔
联系
订阅
管理
2020年2月1日
js合并两个数组的方法
摘要: 1、使用concat(原数组不变) var new = old1.concat(old2) 2、使用for循环(原数组变化) for (var i=0; i<old2.length; i++) { old1.push(old2[i]) } 3、使用apply(原数组变化) old1.push.app
阅读全文
posted @ 2020-02-01 16:28 山根花理
阅读(231)
评论(0)
推荐(0)
2020年1月27日
angular的滚动检测和窗口大小变化检测
摘要: 滚动检测 // 监听滚动事件 scrolling: any ngOnInit() { this.scrolling = fromEvent(window, 'scroll') // fromEvent(element,event) .subscribe((event) => { // 订阅 this
阅读全文
posted @ 2020-01-27 21:29 山根花理
阅读(1119)
评论(0)
推荐(0)
2020年1月24日
轮播图实现
摘要: // 计算当前图片位置 count = 0 timeset() { this.count += -100 if (this.count == -700) { this.count = 0 } } // 滑动主要函数 slide() { const imgList = this.sliderIMG.n
阅读全文
posted @ 2020-01-24 22:17 山根花理
阅读(143)
评论(0)
推荐(0)
angular学习 @ViewChild
摘要: @ViewChild('sliderIMG', { static: true }) sliderIMG: ElementRef // 第二个值不知道是怎么用的 const imgList = this.sliderIMG.nativeElement.getElementsByTagName('li'
阅读全文
posted @ 2020-01-24 22:13 山根花理
阅读(508)
评论(0)
推荐(0)
2020年1月21日
Angular第一个应用用到的模版语法
摘要: <div *ngFor="let product of products"> *ngFor循环遍历products数组(类似vue的v-for) <a [title]="product.name + ' details'"> {{ product.name }} </a> [title]数据绑定(类
阅读全文
posted @ 2020-01-21 15:42 山根花理
阅读(153)
评论(0)
推荐(0)
2020年1月19日
2020/1/19 nodejs简单学习(关于GET/POST)
摘要: const http = require('http') const url = require('url') const querystring = require('querystring') http.createServer((require,response)=>{ // GET请求 le
阅读全文
posted @ 2020-01-19 20:55 山根花理
阅读(166)
评论(0)
推荐(0)
2020年1月17日
从后端解决跨域问题
摘要: 在入口文件index.php中添加 header('Access-Control-Allow-Headers:x-requested-with,content-type'); header('Access-Control-Allow-Origin:http://localhost:8888');
阅读全文
posted @ 2020-01-17 15:38 山根花理
阅读(129)
评论(0)
推荐(0)
2020年1月14日
关于Angularjs的$http.post
摘要: 参考文章:https://www.cnblogs.com/wolf-sun/p/6878868.html 用$http的方式发送post请求时发现发送值一直为null,需要配置一下transformRequest 代码如下 function (obj) { var str = []; for (va
阅读全文
posted @ 2020-01-14 20:35 山根花理
阅读(187)
评论(0)
推荐(0)
Zend Framework2如何建立新的模块
摘要: 1)在module文件夹下建立一个新的模块文件夹User 2)在新建的User文件夹下建立3个文件夹,名字分别为config、src、view 3)建立一个Module.php文件,此文件用来加载当前模块。Module.php代码如下 1 <?php 2 namespace User;//命名空间设
阅读全文
posted @ 2020-01-14 14:29 山根花理
阅读(203)
评论(0)
推荐(0)
公告