03 2015 档案
摘要:It is best to start your application's localization effortsearlyin development, even if you only support one language initially. Libraries like angula...
阅读全文
摘要:Mixins will allow you to apply behaviors to multiple React components.Components are the best way to reuse code in React, but sometimes very different...
阅读全文
摘要:The React component lifecycle will allow you to update your components at runtime. This lesson will explore how to do that.Updating: componentWillRece...
阅读全文
摘要:The previous lesson introduced the React component lifecycle mounting and unmounting. In this lesson you will learn some simple uses for these hooks. ...
阅读全文
摘要:React components have a lifecycle, and you are able to access specific phases of that lifecycle. This lesson will introduce mounting and unmounting of...
阅读全文
摘要:thetransferPropsTomethod lets you easily push properties into your components to easily customize attributes.From last two exmaples, we have BButton a...
阅读全文
摘要:To get the add-ons, usereact-with-addons.js(and its minified counterpart) rather than the commonreact.js.https://facebook.github.io/react/docs/addons....
阅读全文
摘要:When you're building your React components, you'll probably want to access child properties of the markup.Parentcan read its children by accessing the...
阅读全文
摘要:When you are using React components you need to be able to access specific references to individual components. This is done by defining aref. ...
阅读全文
摘要:The owner-ownee relationship is used to designate a parent-child relationship with React components as it differs from the DOM relationship.When one c...
阅读全文
摘要:State is used for properties on a component thatwill change, versus static properties that are passed in. This lesson will introduce you to taking inp...
阅读全文
摘要:var React_app = React.createClass({ render: function() { var age = this.props.age; var name = this.props.name; ...
阅读全文
摘要:React Lesson 1: render methodWhen you write return in render function, better to put () there.When you return multi-tags in return, include th...
阅读全文
摘要:React Lesson 0
阅读全文
摘要:This lesson shows how to refactor your old loops into using a simpler and more powerful lodash-style. We will start by looking at how many people trad...
阅读全文
摘要:In addition to flat Arrays, programmers must often deal with nested Arrays. For example let's say we have an Array of stock exchanges, each of which i
阅读全文
摘要:Both map and filter do not modify the array. Instead they return a new array of the results. Because both map and filter return Arrays, we can chain t
阅读全文
摘要:One very common operation in programming is to iterate through an Array's contents, apply a test function to each item, and create a new array contain
阅读全文
摘要:One very common operation in programming is to iterate through an Array's contents, apply a function to each item, and create a new array containing t
阅读全文
摘要:Most JavaScript developers are familiar with the for loop. One of the most common uses of the for loop is to iterate through the items in an array. In
阅读全文
摘要:Leaflet Demo $.getJSON('//jsbin.com/qogati/1.js', renderMap);function renderMap (geoData) { var map = L.map('map'); var osm = '//{s}.tiles.mapb...
阅读全文
摘要:Leaflet makes creating maps in the browserdead simple. With some HTML and 3 lines of JavaScript, we can quickly have a map displaying// create a map i...
阅读全文
摘要:window.onload = function() { var canvas = document.getElementById("canvas"), context = canvas.getContext("2d"); var gradient =context.cre...
阅读全文
摘要:window.onload = function() { var canvas = document.getElementById("canvas"), context = canvas.getContext("2d"), width = canvas.width = 600,...
阅读全文
摘要:window.onload = function() { var canvas = document.getElementById("canvas"), context = canvas.getContext("2d"); context.beginPath(); c...
阅读全文
摘要:HTML5 Canvas Graphics and Animation/** * Created by Answer1215 on 3/19/2015. */window.onload = function() { //var canvas = $("#canvas")...
阅读全文
摘要:ng-html2js takes .html templates and converts them into strings stored in AngularJS's template cache. This allows you to bundle all of your templates ...
阅读全文
摘要:The TypeScript compiler is a powerful tool which catches mistakes even in vanilla JavaScript. Try it online at theTypeScript Playground, zero setup re...
阅读全文
摘要:Create a greeter.ts file:class Student { fullname : string; constructor(public firstname, public middleinitial, public lastname) { this.f...
阅读全文
摘要:Angular Formly Lesson angular-formly: Introduction Egghead.io lesson by @kentcdodds ...
阅读全文
摘要:What we want is when the server side Node.js files have been changed, we want to use browserify to bundle all file and output just one file and later ...
阅读全文
摘要:npm runallows you to configure scripts inside of yourpackage.jsonfile which can access locally installed node packages. If you're comfortable with thi...
阅读全文
摘要:It is some times convenient, even necessary, to make use of a module that you are working on before it has been published to the node package manager ...
阅读全文
摘要:PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reloa...
阅读全文
摘要:Refering to:https://www.codeschool.com/blog/2015/03/06/digging-advanced-angularjs-directives/
阅读全文
摘要:Make It WorkUsing the included external library,SlabText, create a wrapper directivenwSlabTextso that we can use it in theNoteWranglerapp.Create a lin...
阅读全文
摘要:Filter All the ThingsLet's start cleaning up our notes tweeted page using filters.On the notes tweeted page, within thetweeted.htmltemplate, usefilter...
阅读全文
摘要:Glorious Directives for Our NavigationNoteWrangler navigation has now been broken into two parts: the children —nw-nav-item— and the parent —nw-nav.He...
阅读全文
摘要:Dropdown Arrow ClassIn order to create a down arrow like this:, what class should we apply to the element?Answer: caretOpening DropdownsThe Bootstrap ...
阅读全文
摘要:QuickReader Report Toggle Navigation ...
阅读全文
摘要:Using Bootstrap JavaScript PluginsIf we want to add behavior to our website, which of the following will NOT work?Updating our HTML withdataattributes...
阅读全文
摘要:The AngularJS $exceptionHandler service allows you to catch and handle unanticipated JavaScript errors in a meaningful way.So when application is unde...
阅读全文
摘要:Using $templateCache for quickly retrieval from the cache after first time used.$templateCache mainly can use two methods:get(id)put(id, "your html co...
阅读全文
摘要:Too Much Navigation?How many of Bootstrap's Navigation Components can we use on a page?01More than 1Navigation Homepage LinkThe very top left of our p...
阅读全文
摘要:We are not finishing yet...1. Under MIGX Management, we need to add some "Actionbuttons"2. Also some "contextmenus":3. Add some 'columns' to the forms...
阅读全文
摘要:BIG FUCK for MODxMODx document is not that good ... at least in my opint of view. I spend hours to search martirals to find out how to build a CMP by ...
阅读全文
摘要:$resource RefactorLet's convert our custom Note factory to use Angular resource. Removeall(),find(), andcreate()methods from ourNoteservice and replac...
阅读全文
摘要:Configurable Bits Need a ProviderWe want to be able to configure thecharacterLengthbeforeTweetableruns. Refactor theTweetablefactory into a provider a...
阅读全文
摘要:Element IdentificationThere are a number of classes in Bootstrap that help add prominence to a page by adding a background color and a rounded border ...
阅读全文
摘要:What is TypographyWhen we talk about typography, it's a big subject! Which of the following fall under the umbrella of typography?Choosing a font face...
阅读全文
摘要:sortBy:var collection = ['John', 'Petteri', 'Antti', 'Joonas', 'Zhentian'];var sorted = _.sortBy(collection);//[ 'Antti', 'John', 'Joonas', 'Petteri',...
阅读全文
摘要:Using ES6To use ES6, we need loader.Modify webpack.config.js file:module.exports = { entry: './index.js', output: { filename: 'bundle.js'...
阅读全文
摘要:To use webpack, first you need to run:npm install webpack2. Create a webpack.config.js file:module.exports = { entry: './index.js', output: { ...
阅读全文
摘要:Grid Size For .col-mdWe started designing our site using thecol-md-*classes. These classes target what screen size?PhonesTabletsLaptopsDesktopsGrid Si...
阅读全文