摘要: Optional ArgumentsSet default arguments, when we don't need to call it, we can simply skip it.def new_game(name, year=nil, system=nil) { name: nam... 阅读全文
posted @ 2015-11-02 02:52 Zhentiw 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 1. Rails commends line:Example:rails new blog --skip-test-unit --database=postgresql 阅读全文
posted @ 2015-11-02 02:51 Zhentiw 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Nowdays, Single page apps are becoming increasingly popularamong the fornt-end developers. It is the time to say goodbye with refreshing the whole pag... 阅读全文
posted @ 2015-11-02 02:50 Zhentiw 阅读(471) 评论(0) 推荐(0) 编辑
摘要: To Currencyfunction toCurrency(price){ return price.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");}Deletion from Array:function deleteValues(a... 阅读全文
posted @ 2015-11-02 02:48 Zhentiw 阅读(324) 评论(0) 推荐(0) 编辑
摘要: Besides @Input(), we can also use properties on the @Component, to pass the data.import {Component, View, NgFor, Input} from 'angular2/angular2';@Comp... 阅读全文
posted @ 2015-11-02 02:47 Zhentiw 阅读(290) 评论(0) 推荐(0) 编辑
摘要: Inheritance is a way toindicate that a class receives behavior from a parent class. Then we can override, modify or augmentthose behaviors on the new ... 阅读全文
posted @ 2015-11-02 02:43 Zhentiw 阅读(329) 评论(0) 推荐(0) 编辑