r/angularjs • u/abyx • Dec 08 '16
Angular 1.6.0 is released!
https://github.com/angular/angular.js/blob/master/CHANGELOG.md#160-rainbow-tsunami-2016-12-083
u/Little_Endian Dec 08 '16
Hope you weren't using $http .success() and .error()! But in all seriousness this release wasn't too hard to migrate to and had some needed fixes. Glad it's out of RC finally.
2
1
1
u/LaserRanger Dec 09 '16 edited Dec 09 '16
Am I understanding this correctly?
Input bindings are not available on the controller unless they are first initialized in $onInit()? Todd Motto's article was somewhat difficult for me to follow.
1
u/celluj34 Dec 09 '16
Not exactly. Your bindings aren't initialized until $onInit(). They will not be available in the constructor.
1
u/toddmotto Dec 09 '16
Check this piece that illustrates the bindings that won't be accessible in the controller function: https://toddmotto.com/angular-1-6-is-here#recommendation
1
u/gauiis Dec 27 '16
Why not make it possible to initialize via the constructor? The constructor is exactly for this purpose.
0
Dec 08 '16
[deleted]
7
u/karjala Dec 08 '16
you can override that, to ease migration: https://toddmotto.com/angular-1-6-is-here#re-enabling-auto-bindings
7
u/gabbsmo Dec 08 '16 edited Dec 09 '16
Keep in mind that $onChanges executes before $onInit. If you assign default values in $onInit you still have to null check in $onChanges.