摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
For example, current we have those todos:{ todos: [ { completed: true, id: 0, text: "Learn Redux"}, { completed: false, id: 1, text: "Go shoppi... 阅读全文
摘要:
Creating a Value ObjectSometimes you have javascript object defined: //value object var droidValue = { name: '', speak: function (... 阅读全文
摘要:
Creating a Service:Before actual create an angular service, first create a constructor in Javascript: //constructor function function DroidServi... 阅读全文
摘要:
// backend test beforeEach(inject(function (_$compile_, _$httpBackend_, _$rootScope_, _$state_, _AnnouncementsService_, _CONFIG_) { ... 阅读全文
摘要:
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... 阅读全文
摘要:
Learn how to implement toggling a todo in a todo list application reducer.let todo = (state = [], action) => { switch(action.type){ case 'ADD_IT... 阅读全文
摘要:
Learn how to implement adding a todo in a todo list application reducer.let todo = (state = [], action) => { switch(action.type){ case 'ADD_ITEM... 阅读全文
摘要:
Take away:Always check you ruturn the accumulatorAlways pass in the inital valuevar data = ["vote1", "vote2", "vote1", "vote2"];var reducer = function... 阅读全文