12 2015 档案

摘要:we leverage private components to break our render function into more manageable pieces without leaking the implementation details of our component. ... 阅读全文
posted @ 2015-12-31 04:05 Zhentiw 编辑
摘要:indexOf is used to search for a value or reference inside of an array. In this lesson we first look at what values are returned when a search is succe... 阅读全文
posted @ 2015-12-30 22:23 Zhentiw 编辑
摘要:When using recursion, you must be mindful of the dreadedinfinite loop. Using the recursive function that we’ve built up over the previous lessons, we ... 阅读全文
posted @ 2015-12-30 02:53 Zhentiw 编辑
摘要:var falcorExpress = require( 'falcor-express' );var falcor = require('falcor');var express = require( 'express' );var app = express();var ... 阅读全文
posted @ 2015-12-29 15:22 Zhentiw 编辑
摘要:// Save datavar storage = require('node-persist');storage.init();var people= require('./people.json');people.forEach( (person)=>{ storage.setItem(per... 阅读全文
posted @ 2015-12-26 18:10 Zhentiw 编辑
摘要:var ary = [ { id: 1, name: "Zhentian" }, { id: 2, name: "Alice" }];for..inPrint out the props namefor(let person in ary){ console.log... 阅读全文
posted @ 2015-12-26 18:03 Zhentiw 编辑
摘要:model.setValue('genreList[0].titles[0].rating', 5) .then(function (value) { model.get('genreList[0..1].title... 阅读全文
posted @ 2015-12-26 06:06 Zhentiw 编辑
摘要:Code: Joe Maddalone Instructor egghead.io Using parent compoment in css :hostremov... 阅读全文
posted @ 2015-12-24 18:44 Zhentiw 编辑
摘要:install Polymer and explore creating our first custom element: bower install polymerindex.html: Polymer include webcomponents-list.j... 阅读全文
posted @ 2015-12-22 03:13 Zhentiw 编辑
摘要:The combineReducers function we used in previous post:const todoApp = combineReducers({ todos, visibilityFilter});It accepts and object as agruement... 阅读全文
posted @ 2015-12-22 02:57 Zhentiw 编辑
摘要:Previous, we do composition with objects:const todoApp = (state = {}, action) => { return { todos: todos( state.todos, action ), v... 阅读全文
posted @ 2015-12-22 02:24 Zhentiw 编辑
摘要:Angualr 1.4:.directive('counter', function counter() { return { scope: {}, restrict: 'EA', transclude: true, bindToController: { cou... 阅读全文
posted @ 2015-12-21 02:26 Zhentiw 编辑
摘要:ngMessageFormatcan be installed via npm using the following command:$ npm install angular-message-format --saveangular.module('myApp', ['ngMessageForm... 阅读全文
posted @ 2015-12-21 02:07 Zhentiw 编辑
摘要:ngPluralizeis a directive that displays messages according to en-US localization rules. Person 1: Person 2: Number of People: Without Offset: ... 阅读全文
posted @ 2015-12-21 02:02 Zhentiw 编辑
摘要:Modernizris a library for detecting whether the user's browsers have certain features and based on the availability, we developers will trigger certai... 阅读全文
posted @ 2015-12-21 01:38 Zhentiw 编辑
摘要:Array filter creates a new array with all elements that pass the test implemented by the provided function. In this lesson we discuss how only a truth... 阅读全文
posted @ 2015-12-19 02:50 Zhentiw 编辑
摘要:Using mocha: "devDependencies": { "should": "^5.2.0", "supertest": "^0.15.0" } process.env.A127_ENV = 'test'; var should = require('should'); var requ 阅读全文
posted @ 2015-12-18 15:53 Zhentiw 编辑
摘要:The interactive pseudo-classes for links (and buttons) allow us to make sure the user knows what elements on the page are interactive and that they ca... 阅读全文
posted @ 2015-12-18 03:14 Zhentiw 编辑
摘要:Previous post:http://www.cnblogs.com/Answer1215/p/4990418.htmllet input, config, tasks;input = ['dist'];config = { "dist": ["build", "deploy"], "bui... 阅读全文
posted @ 2015-12-18 03:06 Zhentiw 编辑
摘要: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 编辑
摘要: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 编辑
摘要: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 编辑
摘要:Creating a Value ObjectSometimes you have javascript object defined: //value object var droidValue = { name: '', speak: function (... 阅读全文
posted @ 2015-12-14 19:19 Zhentiw 编辑
摘要: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 编辑
摘要:// backend test beforeEach(inject(function (_$compile_, _$httpBackend_, _$rootScope_, _$state_, _AnnouncementsService_, _CONFIG_) { ... 阅读全文
posted @ 2015-12-11 03:29 Zhentiw 编辑
摘要: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 编辑
摘要: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 编辑
摘要: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 编辑
摘要: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 编辑

点击右上角即可分享
微信分享提示