Esfand
Member since Jan 27, 2016
- Profile: /members/13024-esfand.htm
- Comments: 13
Recent Blog Comments By Esfand
-
FAILURE: Using ngModel With A Custom Component In Angular 2 Beta 1
Posted on Feb 4, 2016 at 2:17 AM
@Ben Yeas. All those various options with a one liner descriptions were scary. As you've seen on Twitter, for the record, another evidence from Victor Savkin: https://twitter.com/victorsavkin/status/695103582459154432 Which says: @BenNadel @esfand Use only 'Default' or 'OnPush'. The rest shou... read more »
-
FAILURE: Using ngModel With A Custom Component In Angular 2 Beta 1
Posted on Feb 3, 2016 at 6:08 PM
https://github.com/angular/angular/blob/2.0.0-beta.2/modules/angular2/src/core/change_detection/constants.ts#L25-L70... read more »
-
FAILURE: Using ngModel With A Custom Component In Angular 2 Beta 1
Posted on Feb 3, 2016 at 6:06 PM
@Fergus Ooops! Sorry I meant 'OnPush'. There is no 'OnChange' enum item. My mistake. Apparently, 'OnPush' is the only one intended to be used by us and the way to set is is via the @component decorator (obviously using TypeScript). When set (via the decorator) that tells the framework: "... read more »
-
FAILURE: Using ngModel With A Custom Component In Angular 2 Beta 1
Posted on Feb 3, 2016 at 4:50 PM
@Ben @Fergus @Mike In a Slack chat room I happened to chat with Rob Wormald a member of the Angular2 team and a very helpful guy. According to him, none of the enum items in 'ChageDetectionStrategy' enum is relevant for users/programmers except the 'OnChange' item. The rest is only for internal... read more »
-
FAILURE: Using ngModel With A Custom Component In Angular 2 Beta 1
Posted on Feb 2, 2016 at 11:07 AM
@Eddy Embarrassingly, @Ben on Twitter let me know my knowledge of Angular2 is antiquated. So, I'm out of commission until I figure out what all those various options in ChangeDetectionStrategy enum are. Last time I checked there was only one option, 'OnChange', there. Now there are many with so... read more »
-
FAILURE: Using ngModel With A Custom Component In Angular 2 Beta 1
Posted on Feb 1, 2016 at 5:08 PM
I'm so badly infected with ES2015 and TypeScript viruses that I can't see the parts. As an exercise, I'll try to port your ES5 code to TS/ES2015 to see what's happening.... read more »
-
FAILURE: Using ngModel With A Custom Component In Angular 2 Beta 1
Posted on Feb 1, 2016 at 3:28 PM
Angular2 Change-Detection Metal Model: Thanks to ZoneJS, In two different occasions Angular2's ChangeDetector wakes up and does two different kinds of book-keeping. 1) On each and every DOM event, ChangeDetector traverses the whole component-tree in a depth-first manner. For each node, it checks ... read more »
-
Directive Output Bindings Use "$event" For Dependency-Injection In AngularJS 2 Beta 1
Posted on Jan 31, 2016 at 9:37 AM
@Fergus, Thanks for the sample. Yes. That is the right (and perhaps the only) approach to implement a custom event.... read more »
-
Directive Output Bindings Use "$event" For Dependency-Injection In AngularJS 2 Beta 1
Posted on Jan 31, 2016 at 6:40 AM
Got it! Thanks for explanation. This is the where I read about possible implementation of bubbling custom event in future: https://github.com/angular/angular/issues/2296#issuecomment-164289758... read more »
-
Directive Output Bindings Use "$event" For Dependency-Injection In AngularJS 2 Beta 1
Posted on Jan 31, 2016 at 1:50 AM
> template expressions use dependency-injection for method invocation Good way of looking at $event. > directive outputs, in that they can only emit a single value. Custom events follow the same model as DOM events. Is this limiting? The difference: DOM events bubble all the way. Custom e... read more »
-
Component Inputs Provide Both Property And Attribute Bindings In AngularJS 2 Beta 1
Posted on Jan 31, 2016 at 12:07 AM
> knowing the non-sugar approach is great for building the mental model! Exactly! Real good way to put it. > There's sooo much to get in my brain. :) Tell me about it. I've found this blog post good for a brief and concise list of sugars. http://victorsavkin.com/post/119943127151/angular-2... read more »
-
Component Inputs Provide Both Property And Attribute Bindings In AngularJS 2 Beta 1
Posted on Jan 28, 2016 at 8:33 AM
Also from the CheatSheat: <div title="Hello {{ponyName}}"> is just syntactic sugar to: <div [title]="'Hello' + ponyName">... read more »
-
Component Inputs Provide Both Property And Attribute Bindings In AngularJS 2 Beta 1
Posted on Jan 27, 2016 at 5:13 PM
I've found it very useful to always imagine a feature, in this case interpolation, without the syntactic sugar. Syntactic sugars obviously increase readability and decrease boilerplate, but at the expense of hiding the real syntax which is more clear and understandable. <div>Hello {{name}}&... read more »