Vincent's Blog


  • Home

  • Categories

  • Archives

  • Tags

Angular2 - Decorator - Component

Posted on 2016-01-25   |   In Angular2
几种Decorator – 其实就相当于把@ 里面的内容通过相应的 ComponentMetadata 进行构造初始化 ComponentMetadata extends DirectiveMetadata, 所以 组件也是指令的一种特例看看特殊点的参数吧 changeDetection: Cha ...
Read more »

Angular2 - Directive - RouterOutlet

Posted on 2016-01-25   |   In Angular2
大段源码 /** * A router outlet is a placeholder that Angular dynamically fills based on the application's route. * * ## Use * * * <router-outlet>&l ...
Read more »

Angular2 - Directive - RouterLink

Posted on 2016-01-22   |   In Angular2
/** * The RouterLink directive lets you link to specific parts of your app. * * Consider the following route configuration: * * @RouteConfig([ * &# ...
Read more »

Angular2 - Directive - NgControlNames

Posted on 2016-01-22   |   In Angular2
这个指令和NgControlGroup 代码上差不多 分析不同 OnChanges事件 如果之前没加到父级的group里那就加如果有任何的model 属性变化,就调用updateModel ngOnChanges(changes: {[key: string]: SimpleChange& ...
Read more »

Angular2 - Directive - NgControlGroup

Posted on 2016-01-22   |   In Angular2
回归下进度NgControlGroup 摘自源码的描述 Creates and binds a control group to a DOM element. This directive can only be used as a child of {@link NgForm} or {@lin ...
Read more »

Angular2 - Class - DirectiveMetadata

Posted on 2016-01-22   |   In Angular2
本来想看的是Directive里的NgControlGroup 由于开头的exportAs 参数直接引导到了DirectiveMetadata 源码里大段的sample和解释,写的很细 首先看下指令的注入Assume this HTML template: <div dependenc ...
Read more »

Angular2 - Directive - NgClass

Posted on 2016-01-19   |   In Angular2
先来看基本用法 The result of an expression evaluation is interpreted differently depending on type of the expression evaluation result: string - all the CSS ...
Read more »

Angular2 - Directive - validators

Posted on 2016-01-19   |   In Angular2
之前写了min-Length的解读http://dreambo8563.github.io/2015/12/23/Angular2-minLenght/ 这里把其他几个也一起了 先来maxlength const MAX_LENGTH_VALIDATOR = CONST_EXPR( new ...
Read more »

Angular2 - Directive - SelectControlValueAccessor

Posted on 2016-01-19   |   In Angular2
这个Accessor比之前checkbox的稍微复杂一点点源码const SELECT_VALUE_ACCESSOR = CONST_EXPR(new Provider( NG_VALUE_ACCESSOR, {useExisting: forwardRef(() => Sel ...
Read more »

Angular2 - Directive - DefaultValueAccessor

Posted on 2016-01-19   |   In Angular2
几乎和CheckboxControlValueAccessor 一模一样了,直接源码const DEFAULT_VALUE_ACCESSOR = CONST_EXPR(new Provider( NG_VALUE_ACCESSOR, {useExisting: forwardRef( ...
Read more »
<i class="fa fa-angle-left"></i>1…242526…29<i class="fa fa-angle-right"></i>
Vincent Guo

Vincent Guo

the blog to remeber all things about code

290 posts
44 categories
103 tags
RSS
github twitter facebook google weibo
Links
  • KunLin
  • Rx Introduction
  • 三哥
  • 元龙
© 2024 Vincent Guo
Powered by Hexo
Theme - NexT.Mist