Matt
Member since Dec 20, 2014
- Profile: /members/12473-matt.htm
- Comments: 4
Recent Blog Comments By Matt
-
Isolating The ngModel Two-Way Data Binding Life-Cycle In AngularJS
Posted on Nov 3, 2015 at 12:21 PM
Maybe you should switch to backbone.js if you don't like angular binding. 2-way data binding is a core feature of angular. The angular team was trying to help the web act more like a desktop MVC app where you don't need to worry about the view and controller having out-of-sync data. Desktop apps hav... read more »
-
Always Trigger The $destroy Event Before Removing Elements In AngularJS Directives
Posted on Apr 4, 2015 at 4:04 PM
Sure @Douglas, The problem here is that we are all thinking of different types of directives. There are many different types of directives. I can think of three styles off the top of my head. There are probably more. 1. Sometimes they are widgets (probably most common). These often have isolate sco... read more »
-
Always Trigger The $destroy Event Before Removing Elements In AngularJS Directives
Posted on Mar 20, 2015 at 12:23 PM
A different, but related great article about nested scopes by Gleb (spoke at ng-conf 2015): http://glebbahmutov.com/blog/separate-model-from-view-in-angular/ I think destroying at the wrong time and creating scope within a directive's link is due to not following best practices. Granted, there ar... read more »
-
Always Trigger The $destroy Event Before Removing Elements In AngularJS Directives
Posted on Dec 20, 2014 at 11:44 PM
Another very important point is to not always destroy scope. If you want to remove the element, you should not always destroy the scope. I have written directives that remove elements that cannot destroy the scope because it is using the existing scope. Example: http://jsfiddle.net/mslocum/cLoh0p91... read more »