上一页 1 ··· 420 421 422 423 424 425 426 427 428 ··· 468 下一页
摘要: Sort can automatically arrange items in an array. In this lesson we look at the basics including how to sort an array of strings alphabetically and th... 阅读全文
posted @ 2015-12-18 02:47 Zhentiw 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Learn a few advanced reduction patterns: flatten allows you to merge a set of arrays into a single array, the dreaded flatmap allows you to convert an... 阅读全文
posted @ 2015-12-17 01:56 Zhentiw 阅读(377) 评论(0) 推荐(0) 编辑
摘要: For example, current we have those todos:{ todos: [ { completed: true, id: 0, text: "Learn Redux"}, { completed: false, id: 1, text: "Go shoppi... 阅读全文
posted @ 2015-12-17 01:23 Zhentiw 阅读(268) 评论(0) 推荐(0) 编辑
摘要: Creating a Value ObjectSometimes you have javascript object defined: //value object var droidValue = { name: '', speak: function (... 阅读全文
posted @ 2015-12-14 19:19 Zhentiw 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Creating a Service:Before actual create an angular service, first create a constructor in Javascript: //constructor function function DroidServi... 阅读全文
posted @ 2015-12-14 03:39 Zhentiw 阅读(224) 评论(0) 推荐(0) 编辑
摘要: // backend test beforeEach(inject(function (_$compile_, _$httpBackend_, _$rootScope_, _$state_, _AnnouncementsService_, _CONFIG_) { ... 阅读全文
posted @ 2015-12-11 03:29 Zhentiw 阅读(317) 评论(0) 推荐(0) 编辑
摘要: In the previous lesson we created a reducer that can handle two actions, adding a new to-do, and toggling an existing to-do. Right now, the code to up... 阅读全文
posted @ 2015-12-02 02:32 Zhentiw 阅读(395) 评论(0) 推荐(0) 编辑
摘要: Learn how to implement toggling a todo in a todo list application reducer.let todo = (state = [], action) => { switch(action.type){ case 'ADD_IT... 阅读全文
posted @ 2015-12-02 02:18 Zhentiw 阅读(275) 评论(0) 推荐(0) 编辑
摘要: Learn how to implement adding a todo in a todo list application reducer.let todo = (state = [], action) => { switch(action.type){ case 'ADD_ITEM... 阅读全文
posted @ 2015-12-02 01:53 Zhentiw 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Take away:Always check you ruturn the accumulatorAlways pass in the inital valuevar data = ["vote1", "vote2", "vote1", "vote2"];var reducer = function... 阅读全文
posted @ 2015-12-01 01:31 Zhentiw 阅读(154) 评论(0) 推荐(0) 编辑
上一页 1 ··· 420 421 422 423 424 425 426 427 428 ··· 468 下一页