上一页 1 ··· 455 456 457 458 459 460 461 462 463 ··· 499 下一页
摘要: ng-show:ng-show element will stay in dom, just added a ng-hide attr, so it won't show.ng-if:It has its own scope.Element is not display in the dom if ... 阅读全文
posted @ 2015-11-12 03:27 Zhentiw 阅读(324) 评论(0) 推荐(0)
摘要: Convenient method to find one item in an array, avoid writing and for + if:let arys = [1,,5,,6] ;let target = 6;let res = arys.find(item => item === t... 阅读全文
posted @ 2015-11-12 03:23 Zhentiw 阅读(557) 评论(0) 推荐(0)
摘要: In es5, you can use indexOf to get the index of one item in an array.In es6, you can use findIndex(), which is more prowful:[NaN].indexOf(NaN) // -1[N... 阅读全文
posted @ 2015-11-12 03:16 Zhentiw 阅读(617) 评论(0) 推荐(0)
摘要: Best Pratices for Object.assign: http://chuna2.787528.xyz/Answer1215/p/5096746.html Object.assign() can extend the object by adding new props: let obj = 阅读全文
posted @ 2015-11-12 03:13 Zhentiw 阅读(636) 评论(0) 推荐(0)
摘要: An introduction to the Web Audio API. In this lesson, we cover creating an audio context and an oscillator node that actually plays a sound in the bro... 阅读全文
posted @ 2015-11-11 01:47 Zhentiw 阅读(280) 评论(0) 推荐(0)
摘要: How to work with JSON data indirectly through a Falcor Model. The Falcor Model allows you to work with data using the same familiar JavaScript path sy... 阅读全文
posted @ 2015-11-09 02:47 Zhentiw 阅读(344) 评论(0) 推荐(0)
摘要: Use the Falcor Router to create a Virtual JSON resource. In this tutorial we will use Falcor’s express middleware to serve the Virtual JSON resource o... 阅读全文
posted @ 2015-11-09 02:34 Zhentiw 阅读(288) 评论(0) 推荐(0)
摘要: You can watch for form / control changes by using .valueChanges.observe({...}): this.sku.valueChanges.observer({ next: (value)=>{ ... 阅读全文
posted @ 2015-11-09 01:55 Zhentiw 阅读(487) 评论(0) 推荐(0)
摘要: Create a custom validtor which only accepts the string start with '123'; function skuValidator(control){ if(!control.value.match(/^123/)){ ... 阅读全文
posted @ 2015-11-09 01:48 Zhentiw 阅读(440) 评论(0) 推荐(0)
摘要: In last post, we need to create an instanse variable:sku: AbstructControl;We can get rid of this by getting the exported form from NgFormControl, what... 阅读全文
posted @ 2015-11-09 01:37 Zhentiw 阅读(367) 评论(0) 推荐(0)
上一页 1 ··· 455 456 457 458 459 460 461 462 463 ··· 499 下一页