Shlomi Assaf
Member since Apr 18, 2016
- Profile: /members/13146-shlomi-assaf.htm
- Comments: 11
Recent Blog Comments By Shlomi Assaf
-
Change Detection Strategy Appears To Override The ChangeDetectorRef In Angular 2 RC 3
Posted on Apr 29, 2017 at 10:10 PM
@ben this is now solved :) https://github.com/angular/angular/issues/9720#event-1062929803... read more »
-
Template vs. ng-container For Grouping DOM Nodes In Angular 2.4.4
Posted on Jan 22, 2017 at 8:39 AM
@Ben I think that in 4.x.x "*" syntax shouldn't be an issue. See this commit : https://github.com/angular/angular/commit/c0178de... read more »
-
Change Detection Strategy Appears To Override The ChangeDetectorRef In Angular 2 RC 3
Posted on Jun 30, 2016 at 8:33 AM
@Ben, What helped me figuring this out is overriding the `cdMode` property on the View to be a get/set via defineProperty and add debugger; statement at the set function. This was done in the console :) Then follow where change occurs via the break point. Really an offside approach but it got me... read more »
-
Change Detection Strategy Appears To Override The ChangeDetectorRef In Angular 2 RC 3
Posted on Jun 30, 2016 at 7:56 AM
BTW, I believe this is a bug so I opened an issue - tagged you. https://github.com/angular/angular/issues/9720... read more »
-
Change Detection Strategy Appears To Override The ChangeDetectorRef In Angular 2 RC 3
Posted on Jun 30, 2016 at 7:46 AM
@Ben, The whole logic of what happens is hidden, it is done in the generated factory for the view of a component. This is expected, since the strategy is part of the component metadata and the metadata is used to generate view factory code. Now, there are only 2 CD strategies: OnPush and Default.... read more »
-
ChangeDetectorRef Is A Special Dependency In Angular 2 RC 3
Posted on Jun 30, 2016 at 5:20 AM
@Ben Don't under estimate :) Great find. From the top of my head, here's what I think happens: MyCounterComponent is a component which means it has an AppView and an AppElement, it also attaches to another view. TestChangeDetectorDirective doesn't have a view. In the process of creating a child ... read more »
-
Templates Appear To Maintain Lexical Bindings In Angular 2 RC 1
Posted on Jun 8, 2016 at 2:08 PM
@Ben, Cool stuff! This idea (minus local template variables) was possible in angular 1 too. Basically it doesn't matter what is the source of the lexical bind, view or component, it's a mechanism to bind properties from the "outside world" In angular 1, you would have used a directive ... read more »
-
Experimenting With Dynamic Template Rendering In Angular 2 RC 1
Posted on Jun 8, 2016 at 12:26 PM
@Ben, Let me just drop this here: https://github.com/shlomiassaf/angular/blob/b6d5a065c866ac6f44d8fd49d614508cce317351/modules/%40angular/common/src/directives/ng_template_outlet.ts Now, look at your TemplateRendererDirective, funny ha :) You just implemented it right :)... read more »
-
Experimenting With Dynamic Template Rendering In Angular 2 RC 1
Posted on Jun 7, 2016 at 10:46 AM
HI, Great read, as usual. Currently (RC1) you need the dynamic template render directive that you built in order to get this done. I created a PR in the angular repo to allow injecting context into the NgTemplateOutlet directive so you can do this with less code and mostly use HTMl syntax to get ... read more »
-
Creating Custom DOM And Host Event Bindings In Angular 2 Beta 6
Posted on May 1, 2016 at 6:09 PM
Ben, as usual great read! I ran into a scenario where an event triggers the event registration which run's before the 1st event bubbled up to the document. This create's a false positive handling where the new registered event fire's on the same vm turn... For example, a button that when clicked r... read more »
-
Providing Custom View Templates For Components In Angular 2 Beta 6
Posted on Apr 18, 2016 at 5:29 PM
Awesome stuff! both Michael & Ben! With a little help from the IDE you'll have full intellisense support in the templates, I think this is coming in WebStrom. Ben I took your follow-up suggestion and created a version with default/fallback support. Here's my blog about it. http://blog.assaf.c... read more »