var prevFiles = ((ngModel && ngModel.$modelValue) || attr.$$ngfPrevFiles || []).slice(0);
I am getting an error that the result of this statement does not have a slice method.
Without knowing too much about the module I have a theory:
The first evaluation (ngModel && ngModel.$modelValue)
, when true, returns a Boolean which does not have a slice method.