- 博客(15)
- 资源 (1)
- 收藏
- 关注
原创 前端框架React - State 和 生命周期
1.Introduction of statethe fact that the Clock sets up a timer and updates the UI every second should be an implementation detail of the Clock.事实上组件的功能和更新UI的代码应该是组件自己的具体实现细节。ReactDOM
2017-03-26 23:25:56 1184
原创 前端框架React - Components and Props
1.Functional and Class ComponentsThey accept arbitrary inputs (called "props") and return React elements describing what should appear on the screen.控件可以接受任意输入(叫做props),返回要显示在screen上的React
2017-03-26 01:15:39 715
原创 前端框架React - 渲染元素
1.把元素渲染进DOMTo render a React element into a root DOM node, pass both to ReactDOM.render()为了把一个react元素渲染进DOM,把他们两个都传进ReactDOM.render()方法。const element = Hello, world;ReactDOM.render(
2017-03-25 21:46:52 737
原创 前端框架Aurelia - Value Converter
1.Value ConverterAurelia的value converter的改进:The Aurelia ValueConverter interface uses toView and fromView methods, which make it quite clear which direction the data is flowing. This
2017-03-23 20:59:08 813
原创 前端框架Aurelia - Computed Properties
import {computedFrom} from 'aurelia-framework';export class Person { firstName: string = 'John'; lastName: string = 'Doe'; @computedFrom('firstName', 'lastName') get fullName(): string {
2017-03-23 20:17:36 647
原创 前端框架Aurelia - Delegate vs Trigger
1.When use whichThe short answer is: Use delegate except when you cannot use delegate.哈哈哈哈写文档的真的太可爱了。Event delegation is a technique used to improve application performance. It dra
2017-03-23 20:05:54 1138
原创 前端框架Aurelia - Binding Selects(一)
1.IntruductionA element can serve as a single-select or multiple-select "picker" depending on whether the multiple attribute is present.select元素可以是单选也可以是多选,在于multiple属性是否存在。配置sele
2017-03-23 19:43:04 677
原创 前端框架Aurelia - Binding Radios
1.IntroductionA group of radio inputs is a type of "single select" interface.单选按钮。Aurelia supports two-way binding any type of property to a group of radio inputs.Aurelia支持双向绑定任何类型的属性与
2017-03-23 16:17:39 570
原创 前端框架Aurelia - Binding Checkbox
1.checkedBind a boolean property to an input element's checked attribute using checked.bind="myBooleanProperty".绑定一个bool类型的值给checked属性来决定checkbox是否check。export class App { motherbo
2017-03-22 19:46:48 702
原创 前端框架Aurelia - Class & Style
1.ClassYou can bind a css string or object to an element's style attribute. Use the style attribute's alias, css when doing string interpolation to ensure your application is compatible with I
2017-03-22 15:45:23 627
原创 前端框架Aurelia - 数据绑定bind(二)
1.String Interpolation字符串插值(羞耻的字眼==)String interpolation expressions enable interpolating (surprise!) the result of an expression with text. 将表达式的结果插入text。 example compared string
2017-03-22 15:04:59 936
原创 前端框架Aurelia - 数据绑定bind(一)
1.HTML and SVG AttributesAurelia supports binding HTML and SVG attributes to JavaScript expressions. Attribute binding declarations have three parts: attribute.command="expression".attri
2017-03-22 13:21:25 960
原创 前端框架Aurelia - 依赖注入Dependency Injection(一)
Let's say we have a CustomerEditScreen that needs to load a Customer entity by ID from a web service. We wouldn't want to place all the details of our AJAX implementation inside our CustomerEditSc
2017-03-22 10:04:24 1008
原创 前端框架Aurelia——组件Component(二)组件生命周期
constructor() - The view-model's constructor is called first.created(owningView: View, myView: View)The created callback will receive the instance of the "owningView". This is the view that th
2017-03-21 20:19:30 1369
原创 前端框架Aurelia——组件Component(一)
In Aurelia, user interface components are composed of view and view-model pairs.组件由html和.ts或者.js文件为一组。Once instantiated, Aurelia's powerful databinding links the two pieces together allowing c
2017-03-21 19:06:39 1965
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人