08 2015 档案

摘要:Degrees and TurnsDegrees are just one value that can be set to a rotate transform to determine how much rotation should be applied. Fill in the blank ... 阅读全文
posted @ 2015-08-31 16:08 Zhentiw 编辑
摘要:ESLint is a JavaScript linter (static analysis tool) that offers full support for ES6, JSX, and other modern tools via plugins. We walk through settin... 阅读全文
posted @ 2015-08-31 15:13 Zhentiw 编辑
摘要:ESLint is a JavaScript linter (static analysis tool) that offers full support for ES6, JSX, and other modern tools via plugins. We walk through settin... 阅读全文
posted @ 2015-08-28 03:57 Zhentiw 编辑
摘要:.btn { background-color: #00A0D6; color: #FFF; transition: all 0.4s;}.btn:active,.btn:focus,.btn:hover { background-color: #007DA7; color: #E3E3E... 阅读全文
posted @ 2015-08-28 01:10 Zhentiw 编辑
摘要:The JSX Transformer library isnotrecommended for production use. Instead, you'll probably want to precompile your JSX into JavaScript.Install:npm inst... 阅读全文
posted @ 2015-08-27 20:06 Zhentiw 编辑
摘要:"JSX transforms from an XML-like syntax into native JavaScript. XML elements and attributes are transformed into function calls and objects, respectiv... 阅读全文
posted @ 2015-08-26 19:25 Zhentiw 编辑
摘要:we want to have the ability to write JSX and see the output live in the browser. Compiler 阅读全文
posted @ 2015-08-26 19:13 Zhentiw 编辑
摘要:JS Bin var Note = angular .Component({ selector: 'note' }) .View({ template: 'World' }) .Class({ co... 阅读全文
posted @ 2015-08-25 20:37 Zhentiw 编辑
摘要:Capturing every event can get chatty. Batching events with a throttled buffer in RxJS lets you capture all of those events and use them responsibly wi... 阅读全文
posted @ 2015-08-24 21:23 Zhentiw 编辑
摘要:Cold:console.clear();var Observable = Rx.Observable;var clock = Observable.interval(1000).take(10).map((i) => `${i}!`);clock.subscribe((x) => { conso... 阅读全文
posted @ 2015-08-24 16:35 Zhentiw 编辑
摘要:If have an observable and you subscribe it twice, those tow subscritions have no connection.console.clear();var Observable = Rx.Observable;var _id = 1... 阅读全文
posted @ 2015-08-24 15:45 Zhentiw 编辑
摘要:When web scraping, you'll often want to get more than just one page of data. Xray supports pagination by finding the "next" or "more" button on each p... 阅读全文
posted @ 2015-08-22 16:47 Zhentiw 编辑
摘要:The very first thing to understand when we're talking about this-keyword is really understand what's the purpose of the this-keyword is, or why we eve 阅读全文
posted @ 2015-08-20 02:15 Zhentiw 阅读(418) 评论(0) 推荐(0) 编辑
摘要:If I have an array, and I want to apply filter, map, forEach to it.let Observable = Rx.Observable;let ary = Observable.fromArray([1,2,5,4,6]);ary .fi... 阅读全文
posted @ 2015-08-19 21:33 Zhentiw 编辑
摘要:Create an observablevar Observable = Rx.Observable;var source = Observable.create(function(observe){ var person = { name: "Zhentian", mes... 阅读全文
posted @ 2015-08-19 16:34 Zhentiw 编辑
摘要:Angular 2 introduces a new event syntax for connecting events on the DOM to your controllers.function Clicker() { this.counter = 0; this.x = 0; ... 阅读全文
posted @ 2015-08-18 19:24 Zhentiw 编辑
摘要:function Clock() { var clock = this; clock.time = 0; clock.message = "This is the message"; setInterval(function() { clock.time++; ... 阅读全文
posted @ 2015-08-18 16:49 Zhentiw 编辑
摘要:JS Bin function Note() {}Note.annotations = [ new angular.ComponentAnnotation({ selector: 'note' }), new angular.ViewAn... 阅读全文
posted @ 2015-08-18 16:32 Zhentiw 编辑
摘要:Before we get too much further, we should mention that putting our model (array) directly in our controller isn't proper form. We should separate the ... 阅读全文
posted @ 2015-08-18 03:39 Zhentiw 编辑
摘要:You can then use this array in your template with theNgFordirective to create copies of DOM elements with one for each item in the array.//Typescriptt... 阅读全文
posted @ 2015-08-18 03:27 Zhentiw 编辑
摘要:React components can be dynamically generated based on a dataset. This lesson will show you how to do just that. React Lesson 15: dynamically c... 阅读全文
posted @ 2015-08-18 01:04 Zhentiw 编辑
摘要:In this unit, we'll look at some of the new features in the latest version of TypeScript 1.4 and talk about why they're important. We'll be covering s... 阅读全文
posted @ 2015-08-17 20:40 Zhentiw 编辑
摘要:Package.json:{ "name": "typescript", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": { "gulp": "^3.9.0", "gulp-t... 阅读全文
posted @ 2015-08-17 20:13 Zhentiw 编辑
摘要:The TypeScript type system enables programmers to express limits on the capabilities of JavaScript objects, and to use tools that enforce these limits... 阅读全文
posted @ 2015-08-17 19:30 Zhentiw 编辑
摘要:Child compoment should be defined before the parent component.Notice that in addition to using theelement in the parent template, you also need to add... 阅读全文
posted @ 2015-08-17 04:13 Zhentiw 编辑
摘要:This quickstart shows how to write your Angular components in TypeScript.To get the benefits of TypeScript, we want to have the type definitions avail... 阅读全文
posted @ 2015-08-14 23:14 Zhentiw 编辑
摘要:Node makes scraping images off the web extremely easy using a couple handy packages: Xray and Download. Simple scrape the img tag, grab all the src at... 阅读全文
posted @ 2015-08-14 20:31 Zhentiw 编辑
摘要:Node and Xray have made web scraping a really simple affair. This video introduces you to the process of scraping all of the "a" tags off of a url and... 阅读全文
posted @ 2015-08-13 16:46 Zhentiw 编辑
摘要:Really the trick to flattening deeply nested structures is to just keep nesting map expressions until you have a variable or function argument, when i... 阅读全文
posted @ 2015-08-12 16:46 Zhentiw 编辑
摘要:Refactoring is a great opportunity to learn and we have an existing Javascript function that islengthy, hard to understand, and overcomplicated. We'll... 阅读全文
posted @ 2015-08-12 03:13 Zhentiw 编辑
摘要:ES6 (ES2015) introduces astandardized module formatto Javascript. We'll take a look at the various forms of defining and importing modules. UsingWebpa... 阅读全文
posted @ 2015-08-12 00:18 Zhentiw 编辑
摘要:import React from 'react/addons';import Note from '../app/components/notes/Notes';var TestUtils = React.addons.TestUtils;describe('Note', () => { v... 阅读全文
posted @ 2015-08-10 21:41 Zhentiw 编辑
摘要:class App extends React.Component{ constructor(){ super(); this.state = { count: 0 } } increaseCount(){ this.setState({count: this... 阅读全文
posted @ 2015-08-10 20:53 Zhentiw 编辑
摘要:Variable Hoisting// Variable Hoistingvar myVariable = 'Outer Value';var fn = function(){ alert(myVariable); var myVariable = 'New Local Value';};fn(... 阅读全文
posted @ 2015-08-01 22:01 Zhentiw 编辑

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