r/angularjs • • Dec 08 '16

Angular 1.6.0 is released!

https://github.com/angular/angular.js/blob/master/CHANGELOG.md#160-rainbow-tsunami-2016-12-08
59 Upvotes

12 comments sorted by

View all comments

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.

5

u/celluj34 Dec 09 '16

It's the stupidest issue I've had to deal with. How can your model change before it's initialized? It just doesn't make sense.

1

u/gauiis Dec 27 '16

1

u/celluj34 Dec 27 '16

Nice. Thanks for that! Still seems dumb though, that I have to check in the first place.