I moved validation to $onChanges because it makes more sense there. Also got rid of ng-init as convenient as it was, it was throwing validation errors because it was created the properties after they were needed in the example.
If we're to put this validation everywhere, we should make some utilities classes to make it dead easy. Something like...
I moved validation to
$onChanges
because it makes more sense there. Also got rid ofng-init
as convenient as it was, it was throwing validation errors because it was created the properties after they were needed in the example.If we're to put this validation everywhere, we should make some utilities classes to make it dead easy. Something like...
Or maybe similar... maybe less verbose.