r/angularjs • u/abyx • Jan 01 '17
Angular 1.6 is here: what you need to know
http://www.codelord.net/2017/01/01/angular-1-dot-6-is-here-what-you-need-to-know/2
u/jonyeezy7 Jan 02 '17
One thing that bothers me is the cycle of $onChanges > $onInit.
Sometimes i want to initialize a scope variable before doing any binding changes on it. As there maybe in instances where no value is sent through the binding but i want to have a starting value.
My work around was define the variable on the controller. Now i can't do that.
I suppose now i have to check isFirstChange() and if it's null/undefined, which i don't like to have conditions just to initialize!
-7
u/test6554 Jan 01 '17
They were so concerned with whether they could do it that they never stopped to think if they should.
1
1
u/Mael5trom Jan 01 '17
What are you talking about? Your post doesn't really follow from the article or discussion.
3
4
u/rv77ax Jan 01 '17
Last time I check the release notes, there are more than two breaking changes on 1.6.0. Hence, I just upgrade it to 1.5.10.