随笔分类 -  angular

摘要:angular在Mac系统下的踩坑 在全局下会报错,但是在/users目录中就ok,于是 发现全局下和/users下会得到不同的结果,如下: 很好奇,全局的ng new跑不通,又跑到/users目录下去执行,居然跑通了,但是需要root权限 感觉很麻烦,每添加一个新文件,都得输入密码,还是不想放弃 阅读全文
posted @ 2017-12-29 17:16 judy201654321 阅读(487) 评论(0) 推荐(0) 编辑
摘要:You seem to not be depending on “@angular/core”. This is an error Just remove the node_modules folder, then re install. after have a try above code, y 阅读全文
posted @ 2017-12-07 06:08 judy201654321 阅读(5038) 评论(0) 推荐(1) 编辑
摘要:You cannot use the new command inside an Angular CLI project. If you see these words you in your terminal, the best way to solve it is just remove pac 阅读全文
posted @ 2017-12-07 05:55 judy201654321 阅读(1335) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/github_39212680/article/details/73410009 阅读全文
posted @ 2017-06-27 18:25 judy201654321 阅读(151) 评论(0) 推荐(0) 编辑
摘要:http://www.cnblogs.com/Answer1215/archive/2016/11.html 阅读全文
posted @ 2017-06-27 15:34 judy201654321 阅读(127) 评论(0) 推荐(0) 编辑
摘要:https://toutiao.io/posts/6qc4md/preview 阅读全文
posted @ 2017-06-27 14:14 judy201654321 阅读(660) 评论(0) 推荐(0) 编辑
摘要:![](http://images2015.cnblogs.com/blog/1108876/201706/1108876-20170625054316116-1756451893.png) ![](http://images2015.cnblogs.com/blog/1108876/201706/1108876-20170625054543054-381938932.png) 阅读全文
posted @ 2017-06-25 05:43 judy201654321 阅读(122) 评论(0) 推荐(0) 编辑
摘要:``` {{i}} add a:string=""; arr:string[]=['apple','pear','orange']; constructor() { } add():void{ if(this.a!=""){ this.arr.push(this.a) }else { return } } ``` 阅读全文
posted @ 2017-06-25 05:40 judy201654321 阅读(146) 评论(0) 推荐(0) 编辑
摘要:依赖注入,高度解耦,这是一个非常好的设计模式,所谓依赖注入,就是在服务中定义属性和方法(http) 阅读全文
posted @ 2017-06-25 05:28 judy201654321 阅读(121) 评论(0) 推荐(0) 编辑
摘要:输出属性 阅读全文
posted @ 2017-06-25 05:27 judy201654321 阅读(186) 评论(0) 推荐(0) 编辑
摘要:输入属性 阅读全文
posted @ 2017-06-25 05:26 judy201654321 阅读(198) 评论(0) 推荐(0) 编辑
摘要:``` @HostListener('mouseenter') onMouseEnter() { this.highlight(this.hight||'red'); } @HostListener('mouseleave') onMouseLeave() { this.highlight(null); } private highlight(color: s... 阅读全文
posted @ 2017-06-25 05:21 judy201654321 阅读(398) 评论(0) 推荐(0) 编辑
摘要:formControl 属性 每一个FormControl都有一个valueChanges事件,该事件返回一个可观察的流 阅读全文
posted @ 2017-06-25 05:10 judy201654321 阅读(568) 评论(0) 推荐(0) 编辑
摘要:引入ReactiveFormsModule即可 阅读全文
posted @ 2017-06-25 05:07 judy201654321 阅读(508) 评论(0) 推荐(0) 编辑
摘要:``` change changes(e){ console.log(e.target.value) } ``` 阅读全文
posted @ 2017-06-25 04:57 judy201654321 阅读(169) 评论(0) 推荐(0) 编辑
摘要:实例化之前需指明泛型,即可发射数据,发射的数据类型即使泛型 阅读全文
posted @ 2017-06-25 04:41 judy201654321 阅读(192) 评论(0) 推荐(0) 编辑
摘要:elementRef.nativeElementk可以得到一个元素的引用,通过这个引用可以随意的操作dom样式 获取元素的引用还有一种方法,通过吧$event传入事件中,就可以与拿到这个事件的所有属性,只要元素有事发生,就可以拿到元素的所有属性,换句话说,可以重写这个元素的样式 e.target就是 阅读全文
posted @ 2017-06-25 04:28 judy201654321 阅读(1847) 评论(0) 推荐(0) 编辑
摘要:slice管道,对数组进行截取,取值范围[a,b) 如果你数学基础还可以,[a,b)你应该知道是个什么情况 eg: 超出范围则When operating on a blank value, the pipe returns the blank value. date 和angular.js使用方法 阅读全文
posted @ 2017-06-25 03:40 judy201654321 阅读(239) 评论(0) 推荐(0) 编辑
摘要:angular4从3.24出来有一段时间了,关于api,我想简单介绍下比较陌生的 阅读全文
posted @ 2017-06-25 03:34 judy201654321 阅读(140) 评论(0) 推荐(0) 编辑